EncryptionUtils class

A utility class designed for encryption-related operations, such as key pair generation, public/private key manipulation, and address generation.

Constructors

EncryptionUtils.new()

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

checkAddress(String address) bool
Validates the encoded address.
checkEncPrivateKey(String encPrivateKey) bool
Checks if the encoded private key is valid.
checkEncPublicKey(String encPublicKey) bool
Validates the encoded public key.
encodeVpToBase64(VerifiablePresentation vp) String
Encodes a Verifiable Presentation (VP) into a Base64 string.
formatDecode(String arg) String
Decodes a Base64Url string to a Base64-compatible format.
generateDid(Uint8List rawPrivateKey) Future<String>
Generates a decentralized identifier (DID) from a given raw private key.
generateKeyPair() Future<CreateAccount>
Generates a cryptographic key pair consisting of a private key, public key, address, and DID.
generatePrivateKey(Uint8List rawPrivKey) String
Generates an encoded private key from a Uint8List raw private key.
generatePublicKey(Uint8List seed) Future<String>
Generates an encoded public key from a given seed (raw private key).
generatePublicKeyRaw(Uint8List seed) Future<String>
Generates the raw public key (unencoded) associated with the given seed.
getAddress(String encPublicKey) String
Generates the address associated with a given encoded encPublicKey.
getEncPublicKey(String privateKey) Future<String>
Generates the encryption public key associated with the input privateKey.
naclSign(String privateKey, Uint8List message) → SignedMessage
Signs a message using the provided private key.
naclVerify(SignatureBase signature, Uint8List message, String encPublicKey) bool
Verifies a message and its signature using the provided public key.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
parsePrivateKey(String encPrivateKey) Uint8List
Parses and validates an encoded private key.
parsePublicKey(String encPublicKey) Uint8List
Parses and validates an encoded public key.
signBlob(String msg, String privateKey) Future<SignBlob>
Signs a message with the provided private key.
signMessage(String msg, String privateKey) Future<SignMessage>
Signs a message with the provided private key.
toString() String
A string representation of this object.
inherited
verify(List<int> signatureData, List<int> msg, String encPublicKey) Future<bool>
Verifies a message's signature using the provided public key.
verifyEddsaSignature(String jws, String publicKeyHex) Future<bool>
Verifies a JWS (JSON Web Signature) using EDDSA and the provided public key.

Operators

operator ==(Object other) bool
The equality operator.
inherited