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

encryptSensitive

static fun encryptSensitive(message: Bytes!, password: String!): Bytes! (source)

Encrypt a message with 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

message - Bytes!: The message to encrypt.

password - String!: The password to use for encryption.

Return
Bytes!: The encrypted data.

static fun encryptSensitive(message: ByteArray!, password: String!): ByteArray! (source)

Encrypt a message with 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

message - ByteArray!: The message to encrypt.

password - String!: The password to use for encryption.

Return
ByteArray!: The encrypted data.

static fun encryptSensitive(message: Bytes!, password: String!, algorithm: Algorithm!): Bytes! (source)

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

Parameters

message - Bytes!: The message to encrypt.

password - String!: The password to use for encryption.

algorithm - Algorithm!: The algorithm to use.

Return
Bytes!: The encrypted data.

static fun encryptSensitive(message: ByteArray!, password: String!, algorithm: Algorithm!): ByteArray! (source)

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

Parameters

message - ByteArray!: The message to encrypt.

password - String!: The password to use for encryption.

algorithm - Algorithm!: The algorithm to use.

Return
ByteArray!: The encrypted data.