Add API to seal with a user's public key

This commit is contained in:
Vishnu Mohandas 2020-10-11 04:11:15 +05:30
parent 50a67acb75
commit 86b60fd487

View file

@ -220,4 +220,8 @@ class CryptoUtil {
Uint8List input, Uint8List publicKey, Uint8List secretKey) {
return Sodium.cryptoBoxSealOpen(input, publicKey, secretKey);
}
static Uint8List sealSync(Uint8List input, Uint8List publicKey) {
return Sodium.cryptoBoxSeal(input, publicKey);
}
}