utils/crypto library

Constants

IV_LENGTH → const int
KEY_LENGTH → const int
TYPE_0 → const int
TYPE_1 → const int
TYPE_LENGTH → const int
ZERO_INDEX → const int

Functions

decodeTypeByte(Uint8List byte) int
decrypt({required String symKey, required String encoded}) Future<String>
deriveSymKey(String privateKeyA, String publicKeyB) Future<String>
deserialize(String encoded) CryptoEncodingParams
encodeTypeByte(int type) Uint8List
encrypt({required String message, required String symKey, int? type, String? iv, String? senderPublicKey}) Future<String>
generateKeyPair() Future<CryptoKeyPair>
generateRandomBytes32() String
hashKey(String key) Future<String>
hashMessage(String message) Future<String>
isTypeOneEnvelope(CryptoEncodingValidation result) bool
randomBytes(int length) List<int>
serialize({required Uint8List type, required Uint8List sealed, required Uint8List iv, Uint8List? senderPublicKey}) String
validateDecoding({required String encoded, CryptoDecodeOptions? opts}) CryptoEncodingValidation
validateEncoding([CryptoEncodeOptions? opts]) CryptoEncodingValidation