Verifier Object Members for SuiteScript in NetSuite

The Verifier object in SuiteScript enables signature verification using a specified certificate, enhancing security in NetSuite.

·2 min read·View Oracle Docs

The Verifier object in SuiteScript plays a crucial role in verifying string signatures against certificates, enhancing security protocols for applications. This object is part of the N/crypto/certificate module, introduced in NetSuite and is specifically designed for server scripts.

What Are the Members of the Verifier Object?

The Verifier object includes the following key members:

Member NameTypeReturn Type / Value TypeSupported Script TypesDescription
Verifier.update()MethodvoidServer scriptsUpdates the string that needs to be verified.
Verifier.verify()MethodvoidServer scriptsVerifies the string against the provided signature.

How Does the Verifier Object Work?

The Verifier object is returned by the method certificate.createVerifier(options), which requires options to specify the certificate ID and the hashing algorithm to use for verification. Here’s an example syntax:

suitescript
1//Additional code...
2var myVerifier = certificate.createVerifier({
3 certId: 'custcertificate1',
4 algorithm: certificate.HashAlg.SHA256
5});
6
7myVerifier.update('test');
8myVerifier.verify(result);
9//Additional code...

The above code initializes a Verifier instance, updates it with the string to verify, and then calls the verify method against a result signature. Each method does not return any values but performs necessary operations for verification.

Practical Considerations

  • Encoding: While updating, you can specify an optional string encoding; if not specified, it defaults to UTF-8.
  • Governance: These methods do not adhere to governance limits, which can be beneficial in intensive verification scenarios.

Who This Affects

  • Developers: Implementing server-side functionality that necessitates robust security measures.
  • Administrators: Managing and overseeing security configurations related to certificate handling.

Key Takeaways

  • The Verifier object is essential for string signature verification in SuiteScript.
  • It supports server scripts and integrates with various security features through certificates.
  • No governance limits apply to the methods in this object, making it suitable for high-volume operations.

Source: This article is based on Oracle's official NetSuite documentation.

Frequently Asked Questions (4)

Do I need to enable a feature flag to use the Verifier object in NetSuite SuiteScript?
The article does not mention the need to enable a feature flag, but it specifies that the Verifier object is part of the N/crypto/certificate module and used in server scripts.
What script types are supported by the Verifier object methods in NetSuite?
The methods of the Verifier object, such as update() and verify(), are supported for server scripts in SuiteScript.
How does the Verifier object handle string encoding during updates?
When using the Verifier.update() method, you can specify an optional string encoding. If no encoding is specified, it defaults to UTF-8.
Are there any governance limits on the Verifier object methods in SuiteScript?
There are no governance limits for the Verifier.update() and Verifier.verify() methods, which is beneficial for intensive verification tasks.
Source: Verifier Object Members Oracle NetSuite Help Center. This article was generated from official Oracle documentation and enriched with additional context and best practices.

Was this article helpful?

More in Security

View all Security articles →