crypto.createDecipher(options)
Method Description |
Creates a new crypto.Decipher object.
Note:
The blockCipherMode is automatically set to CBC. |
Returns |
A crypto.Decipher object. |
Supported Script Types |
Server scripts For additional information, see SuiteScript 2.x Script Types. |
Governance |
None |
Module |
|
Since |
2015.2 |
Parameters
The options parameter is a JavaScript object.
Parameter |
Type |
Required / Optional |
Description |
Since |
---|---|---|---|---|
|
string |
required |
The hash algorithm. Use the crypto.EncryptionAlg enum to set the value. |
2015.2 |
|
object |
required |
The crypto.SecretKey object used for encryption.
Note:
When using the crypto.SecretKey object for an AES algorithm, the length of the text (secret key) that is used to generate the GUID must be 16, 24, or 32 characters. |
2015.2 |
|
object |
optional |
The padding for the cipher. Use the crypto.Padding enum to set the value. |
2015.2 |
|
string |
required |
The initialization vector that was used for encryption. You can use a CipherPayload.iv value. |
2015.2 |
Syntax
The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/crypto Module Script Samples.
//Add additional code
...
var decipher = crypto.createDecipher({
algorithm: crypto.EncryptionAlg.AES,
key: sKey,
padding: NoPadding,
iv: '2311141720'
});
...
//Add additional code