encryptDetached static method

DetachedCipher encryptDetached(
  1. Uint8List value,
  2. Uint8List nonce,
  3. Uint8List key, {
  4. Uint8List? additionalData,
})

Encrypts a message with optional additional data, a key and a nonce. Returns a detached cipher text and mac.

Implementation

static DetachedCipher encryptDetached(
        Uint8List value, Uint8List nonce, Uint8List key,
        {Uint8List? additionalData}) =>
    Sodium.cryptoAeadChacha20poly1305EncryptDetached(
        value, additionalData, null, nonce, key);