wrapKey method
Wraps a key.
Throws an AskarKeyException if wrapping fails.
Implementation
EncryptedBuffer wrapKey({required Key other, Uint8List? nonce}) {
try {
return askarKeyWrapKey(
localKeyHandle,
other.handle,
nonce: nonce,
).getValueOrException();
} catch (e) {
throw AskarKeyException('Failed to wrap key: $e');
}
}