Shortcuts to a default PostQuantumCryptoEngine (pure-Dart backend, SecurityPolicy.standard).
final keys = PostQuantumCrypto.generateEncryptionKeyPair();
final env = PostQuantumCrypto.encrypt(data, recipients: [keys.publicKey]);
final pt = PostQuantumCrypto.decrypt(env, privateKey: keys.privateKey);
These calls are synchronous and CPU-bound; see runInBackground.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- engine → PostQuantumCryptoEngine
-
The default engine.
final
Static Methods
-
decrypt(
EncryptedEnvelope envelope, {required EncryptionPrivateKey privateKey, Map< String, String> ? requiredContext}) → Uint8List -
encrypt(
List< int> plaintext, {required List<EncryptionPublicKey> recipients, Map<String, String> context = const {}}) → EncryptedEnvelope -
generateEncryptionKeyPair(
{KemAlgorithm algorithm = KemAlgorithm.mlKem768}) → EncryptionKeyPair -
generateSigningKeyPair(
{SignatureAlgorithm algorithm = SignatureAlgorithm.mlDsa65}) → SigningKeyPair -
sign(
List< int> message, {required SigningPrivateKey privateKey, List<int> context = const []}) → Uint8List -
verify(
List< int> message, {required List<int> signature, required SigningPublicKey publicKey, List<int> context = const []}) → bool