Verifier Object Members for SuiteScript in NetSuite
The Verifier object in SuiteScript enables signature verification using a specified certificate, enhancing security in NetSuite.
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 Name | Type | Return Type / Value Type | Supported Script Types | Description |
|---|---|---|---|---|
Verifier.update() | Method | void | Server scripts | Updates the string that needs to be verified. |
Verifier.verify() | Method | void | Server scripts | Verifies 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:
1//Additional code...2var myVerifier = certificate.createVerifier({3 certId: 'custcertificate1',4 algorithm: certificate.HashAlg.SHA2565});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.
Frequently Asked Questions (4)
Do I need to enable a feature flag to use the Verifier object in NetSuite SuiteScript?
What script types are supported by the Verifier object methods in NetSuite?
How does the Verifier object handle string encoding during updates?
Are there any governance limits on the Verifier object methods in SuiteScript?
Was this article helpful?
More in SuiteScript
- SuiteScript 2.1 Enhancements in NetSuite February Updates
SuiteScript 2.1 now supports async features and PATCH method. Discover the latest API and SuiteProcurement improvements.
- Scheduling Map/Reduce Script Deployments in NetSuite
Learn to schedule map/reduce script submissions, including one-time and recurring options in NetSuite.
- Binary File Support in N/https Module for SuiteScript
SuiteScript enhances capabilities with binary file support in the N/https module, allowing improved data handling in external communications.
- API Governance Units Calculation in NetSuite 2026.1
NetSuite 2026.1 introduces examples illustrating API governance unit calculations for both user event and scheduled scripts.
