derEncode method
Encode a hash to a DER message
Implementation
Uint8List derEncode(Uint8List hash, HashAlgorithm digest) {
return ASN1Sequence(elements: [
ASN1Sequence(elements: [
ASN1ObjectIdentifier(Pkcs.hashAlgorithmIdentifiers[digest]),
ASN1Null(),
]),
ASN1OctetString(octets: hash),
]).encode();
}