serialize method
Serialize a PrivateKey instance into list of bytes.
Implementation
Uint8List serialize() {
final ptr = bindings.CPrivateKeySerialize(_privateKey);
final bytes = Uint8List.fromList(
ptr.cast<Uint8>().asTypedList(bindings.CPrivateKeySizeBytes()),
);
bindings.SecFree(ptr);
return bytes;
}