https.createSecureString(options)

Method Description

Creates and returns an https.SecureString. The input for the secure string can be a GUID or a secret. For more information about secrets, see Secrets Management.

Returns

https.SecureString

Supported Script Types

Server scripts

For more information, see SuiteScript 2.x Script Types.

Governance

None

Module

N/https Module

Since

2015.2

Parameters
Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

Since

options.input

string

required

The string to convert to a https.SecureString.

The following patterns are accepted:

  • \{[a-fA-F0-9]{32}\} or alternatively { + <32 hexadecimal characters forming a UUID/GUID> + }

  • \{custsecret[a-zA-Z0-9_]{1,89}\} or alternatively { + custsecret + <1 up to 89 alfanumeric characters or underscores > + }

  • specific payment-plugin tokens

Release 15 Version 2

options.inputEncoding

https.Encoding

optional

Identifies the encoding that the input string uses.

The default value is UTF_8.

Release 15 Version 2

Syntax
Important:

The following code sample shows the syntax for this member. It is not a functional example. For a complete script example, see N/https Module Script Samples.

          // Add additional code 
...
    var passwordGuid = '{284CFB2D225B1D76FB94D150207E49DF}';
    var secureToken = https.createSecureString({   // secureToken is an https.SecureString
        input: passwordGuid
    });
...
// Add additional code 

        

Related Topics

General Notices