tuweni / org.apache.tuweni.crypto.sodium / SecretBox / decryptSensitive

decryptSensitive

@Nullable static fun decryptSensitive(cipherText: Bytes!, password: String!): Bytes? (source)

Decrypt a message using a password, using PasswordHash for the key generation (with the currently recommended algorithm and limits on operations and memory that are suitable for sensitive use-cases).

Parameters

cipherText - Bytes!: The cipher text to decrypt.

password - String!: The password that was used for encryption.

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

@Nullable static fun decryptSensitive(cipherText: ByteArray!, password: String!): ByteArray? (source)

Decrypt a message using a password, using PasswordHash for the key generation (with the currently recommended algorithm and limits on operations and memory that are suitable for sensitive use-cases).

Parameters

cipherText - ByteArray!: The cipher text to decrypt.

password - String!: The password that was used for encryption.

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

@Nullable static fun decryptSensitive(cipherText: Bytes!, password: String!, algorithm: Algorithm!): Bytes? (source)

Decrypt a message using a password, using PasswordHash for the key generation (with limits on operations and memory that are suitable for sensitive use-cases).

Parameters

cipherText - Bytes!: The cipher text to decrypt.

password - String!: The password that was used for encryption.

algorithm - Algorithm!: The algorithm that was used for encryption.

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

@Nullable static fun decryptSensitive(cipherText: ByteArray!, password: String!, algorithm: Algorithm!): ByteArray? (source)

Decrypt a message using a password, using PasswordHash for the key generation (with limits on operations and memory that are suitable for sensitive use-cases).

Parameters

cipherText - ByteArray!: The cipher text to decrypt.

password - String!: The password that was used for encryption.

algorithm - Algorithm!: The algorithm that was used for encryption.

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