fromBytes static method
Implementation
static SSHFPResponseRecord fromBytes({
required String name,
required int ttl,
required Uint8List bytes,
required int offset,
required int length }) {
if (length < 2 || (offset + length) > bytes.length) {
throw FormatException('Invalid SSHFP record: too short or out of range');
}
final int algorithm = bytes[offset];
final int fingerprintType = bytes[offset + 1];
final Uint8List fingerprint = bytes.sublist(offset + 2, offset + length);
return SSHFPResponseRecord(
name: name,
ttl: ttl,
algorithm: algorithm,
fingerprintType: fingerprintType,
fingerprint: fingerprint);
}