tuweni / org.apache.tuweni.crypto.sodium / AES256GCM / decrypt

decrypt

@Nullable fun decrypt(cipherText: Bytes!, nonce: Nonce!): Bytes? (source)

Decrypt a message.

Parameters

cipherText - Bytes!: The cipher text to decrypt.

nonce - Nonce!: The nonce that was used for encryption.

Return
Bytes?: The decrypted data, or null if verification failed.

@Nullable fun decrypt(cipherText: ByteArray!, nonce: Nonce!): ByteArray? (source)

Decrypt a message.

Parameters

cipherText - ByteArray!: The cipher text to decrypt.

nonce - Nonce!: The nonce that was used for encryption.

Return
ByteArray?: The decrypted data, or null if verification failed.

@Nullable fun decrypt(cipherText: Bytes!, data: Bytes!, nonce: Nonce!): Bytes? (source)

Decrypt a message.

Parameters

cipherText - Bytes!: The cipher text to decrypt.

data - Bytes!: Extra non-confidential data that is included within the encrypted payload.

nonce - Nonce!: The nonce that was used for encryption.

Return
Bytes?: The decrypted data, or null if verification failed.

@Nullable fun decrypt(cipherText: ByteArray!, data: ByteArray!, nonce: Nonce!): ByteArray? (source)

Decrypt a message.

Parameters

cipherText - ByteArray!: The cipher text to decrypt.

data - ByteArray!: Extra non-confidential data that is included within the encrypted payload.

nonce - Nonce!: The nonce that was used for encryption.

Return
ByteArray?: The decrypted data, or null if verification failed.

@Nullable static fun decrypt(cipherText: Bytes!, key: Key!, nonce: Nonce!): Bytes? (source)

Decrypt a message using a given key.

Parameters

cipherText - Bytes!: The cipher text to decrypt.

key - Key!: The key to use for decryption.

nonce - Nonce!: The nonce to use when decrypting.

Return
Bytes?: The decrypted data, or null if verification failed.

@Nullable static fun decrypt(cipherText: ByteArray!, key: Key!, nonce: Nonce!): ByteArray? (source)

Decrypt a message using a given key.

Parameters

cipherText - ByteArray!: The cipher text to decrypt.

key - Key!: The key to use for decryption.

nonce - Nonce!: The nonce to use when decrypting.

Return
ByteArray?: The decrypted data, or null if verification failed.

@Nullable static fun decrypt(cipherText: Bytes!, data: Bytes!, key: Key!, nonce: Nonce!): Bytes? (source)

Decrypt a message using a given key.

Parameters

cipherText - Bytes!: The cipher text to decrypt.

data - Bytes!: Extra non-confidential data that is included within the encrypted payload.

key - Key!: The key to use for decryption.

nonce - Nonce!: The nonce that was used for encryption.

Return
Bytes?: The decrypted data, or null if verification failed.

@Nullable static fun decrypt(cipherText: ByteArray!, data: ByteArray!, key: Key!, nonce: Nonce!): ByteArray? (source)

Decrypt a message using a given key.

Parameters

cipherText - ByteArray!: The cipher text to decrypt.

data - ByteArray!: Extra non-confidential data that is included within the encrypted payload.

key - Key!: The key to use for decryption.

nonce - Nonce!: The nonce that was used for encryption.

Exceptions

UnsupportedOperationException - If AES256-GSM support is not available.

Return
ByteArray?: The decrypted data, or null if verification failed.