Modules

filter

 

Objects/Functions

module (N/crypto)

SuiteScript 2.0

crypto.createSecretKey(options)

{crypto}.createSecretKey({guid: {string*},encoding: {enum}})

N/crypto Module
crypto.createSecretKey()
Method Description: Method used to create a new crypto.SecretKey object. This method can take a GUID. Use Form.addCredentialField(options) to generate a value. 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.
Returns: A crypto.SecretKey object
Supported Script Types: Server-side scripts For additional information, see SuiteScript 2.0 Script Types.
Governance: None
Module: N/crypto Module
Since: 2015.2
Search NetSuite - https://system.netsuite.com/app/help/helpcenter.nl?search=crypto.createSecretKey(options)

Example:

// Code Example 1
//Add additional code
//...
var secretKey = crypto.createSecretKey({
encoding: encode.Encoding.HEX,
guid: '284CFB2D225B1D76FB94D150207E49DF'
});
//...
//Add additional code

//SOURCE: https://system.netsuite.com/app/help/helpcenter.nl?fid=section_4358653390.html