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
A
suitescript api
1crypto.createSecretKey({2 guid: /* string */,3 secret: /* string */,4 encoding: /* enum, optional */5});
| Parameter | Type | Required | Description |
|---|---|---|---|
| options.guid | string | A 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.secret | string | The 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.encoding | enum | optional | Specifies the encoding for the SecureKey. Use the encode.Encoding enum to set the value. The default value is encode.Encoding.HEX . |
B
mynt syntax
No Mynt syntax yet.
Nothing in the language compiles to crypto.createSecretKey(options) today. How should it read?
C
community proposals
Competing syntax for createSecretKey, from GitHub Discussions. Select two or more to compare them side by side.
Loading proposals from GitHub…
D
suggest an alternative
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,saveandRef[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?