Signer.sign(options)

Note:

The content in this help topic pertains to SuiteScript 2.0.

Method Description

Signs the string and returns the signature. Formatting, such as line breaks, is disabled in signatures.

Returns

string

Supported Script Types

Server scripts

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

Governance

None

Module

N/crypto/certificate Module

Parent Object

certificate.Signer

Sibling Object Members

Signer Object Members

Since

2019.1

Parameters

Note:

The options parameter is a JavaScript object.

Parameter

Type

Required / Optional

Description

options.outputEncoding

string

optional

Encoding of the signed string in Base64 format.

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/crypto/certificate Module Script Samples.

              //Add additional code
...
var signer = certificate.createSigner({
    certId: 'custcertificate1',
    algorithm: certificate.HashAlg.SHA256
    });
signer.update("test");
var result = signer.sign();
...
//Add additional code 

            

Related Topics

General Notices