@Nullable static fun decrypt(cipherText: Bytes!, key: Key!, nonce: Nonce!): Bytes?
(source)
Decrypt a message using a key.
cipherText
- Bytes!: The cipher text to decrypt.
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: Allocated!, key: Key!, nonce: Nonce!): Allocated?
(source)
Decrypt a message using a key.
cipherText
- Allocated!: The cipher text to decrypt.
key
- Key!: The key to use for decryption.
nonce
- Nonce!: The nonce that was used for encryption.
Return
Allocated?: 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 key.
cipherText
- ByteArray!: The cipher text to decrypt.
key
- Key!: The key to use for decryption.
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!, 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 most use-cases).
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 decrypt(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 most use-cases).
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 decrypt(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 most use-cases).
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 decrypt(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 most use-cases).
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.
@Nullable static fun decrypt(cipherText: Bytes!, password: String!, opsLimit: Long, memLimit: Long, algorithm: Algorithm!): Bytes?
(source)
Decrypt a message using a password, using PasswordHash
for the key generation.
cipherText
- Bytes!: The cipher text to decrypt.
password
- String!: The password that was used for encryption.
opsLimit
- Long: The opsLimit that was used for encryption.
memLimit
- Long: The memLimit 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 decrypt(cipherText: ByteArray!, password: String!, opsLimit: Long, memLimit: Long, algorithm: Algorithm!): ByteArray?
(source)
Decrypt a message using a password, using PasswordHash
for the key generation.
cipherText
- ByteArray!: The cipher text to decrypt.
password
- String!: The password that was used for encryption.
opsLimit
- Long: The opsLimit that was used for encryption.
memLimit
- Long: The memLimit that was used for encryption.
algorithm
- Algorithm!: The algorithm that was used for encryption.
UnsupportedOperationException
- If the specified algorithm is not supported by the currently loaded sodium native library.
Return
ByteArray?: The decrypted data, or null
if verification failed.