Scoop API

scoop:scoop.crypto:0.1.0

decryptOrNone

function decryptOrNone

source · line 49
public
public fun decryptOrNone(algorithm: AeadAlgorithm, key: SecretKey, nonce: List<Byte>, encrypted: AeadCiphertext, aad: List<Byte> = Array<Byte>(0L) { _ -> 0.toByte() }): Array<Byte>?

Authenticates before returning plaintext. Only authentication mismatch returns None; invalid sizes and backend failures throw.