Encrypt
Encrypts an object using the specified algorithm and key
Method Signature
Arguments
Argument | Type | Required | Description | Default |
---|---|---|---|---|
|
|
| The object to encrypt. If the object is not a string or binary data, the object must implement the java.io.Serializable interface | |
|
|
| The string representation of the secret key to use for encryption ( see generateSecretKey() ) | |
|
|
| The algorithm to use for encryption. Default is AES | |
|
|
| The encoding type to use for encoding the encrypted data. Default is Base64 |
|
|
|
| The initialization vector or salt to use for encryption. | |
|
|
| The number of iterations to use for encryption. Default is 1000 |
|
|
|
| If set to true, the string and key will be validated before encryption to ensure conformity to the algorithm. Default is false |
|
Examples
Related
Last updated