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
- Common SuiteScript Errors and Solutions for NetSuite
Common NetSuite script errors include INVALID_SCRIPT_DEPLOYMENT_ID and SSS_AUTHORIZATION_HEADER_NOT_ALLOWED. Learn effective solutions.
- Set Sublist Field Values in SuiteScript 2.x for Record Management
Set sublist field values in SuiteScript 2.x for effective record management using standard and dynamic modes.
- Setting Field Values in SuiteScript for Effective Record
Learn to set field values in SuiteScript effectively, troubleshooting common errors and understanding data types.
- SuiteScript 2.1 Enhancements and API Updates in NetSuite
SuiteScript 2.1 enables execution of 2.0 scripts and supports PATCH method for enhanced API capabilities.
Advertising
Reach SuiteScript Professionals
Put your product in front of NetSuite experts who work with SuiteScript every day.
Sponsor This Category