module function · N/crypto

createSecretKey()

crypto.createSecretKey(options)

Creates and returns a new crypto.SecretKey Object.

Implementation
Not started
Design
Open for proposals suggest how it should read
Proposals
A
Signature
crypto.createSecretKey(options)
Module
N/crypto
Returns
Object
Governance
None
Script types
Server scripts
Version
SuiteScript 2.x, documented for 2.1; since NetSuite 2015.2
call shapefrom Oracle's parameter table
1crypto.createSecretKey({2    guid:     /* string */,3    secret:   /* string */,4    encoding: /* enum, optional */5});
Oracle reference for this method
ParameterTypeRequiredDescription
options.guidstringA GUID used to generate a secret key. The GUID can resolve to either data or metadata. You can create a GUID using Form.addCredentialField(options) . This is only required if a secret is not provided. You cannot use the guid parameter in combination with the secret parameter.
options.secretstringThe script ID of the secret used for authentication. You can store secrets at Setup > Company > API Secrets . For more information, see Secrets Management . This is only required if GUID is not provided. You cannot use the secret parameter in combination with the passwordGuid parameter.
options.encodingenumoptionalSpecifies the encoding for the SecureKey. Use the encode.Encoding enum to set the value. The default value is encode.Encoding.HEX .
B

No Mynt syntax yet.

Nothing in the language compiles to crypto.createSecretKey(options) today. How should it read?

C

Competing syntax for createSecretKey, from GitHub Discussions. Select two or more to compare them side by side.

All discussions

Loading proposals from GitHub…

D

Write the Mynt you wish you could write.

A good proposal shows the syntax, the SuiteScript it should become, and argues for it: why it is clearer, how it fits the rest of the language, what it makes harder.

  • Clarity. Does it say what happens, without ceremony?
  • Consistency. Does it read like load, save and Ref[field]?
  • Expressiveness. Does it cover the cases people actually write?
  • Honesty. Does it hide a NetSuite cost, such as governance, that a reader should see?

N/crypto · crypto.createSecretKey(options)

Suggest syntax for createSecretKey