Hi Everyone, I have one problem with encrypting a...
# suitescript
p
Hi Everyone, I have one problem with encrypting and decrypting strings by using the RSA algorithm in NetSuite. I tried to use the N/Crypto module, but this module supports only the AES algorithm and not the RSA algorithm. I checked that with NS support also, but they said this case is in enhancement so you can try to use third-party libraries. I tried to use the following libraries: "Node-RSA, Forge, Crypto, and JSencrypt.". But when I am adding the library path in SuiteScript, I am not able to save the script record. I am getting the undefined keyword. like that issue. Does anyone have an idea how we can use the RSA algorithm in NetSuite? Thank you in advance.
b
typically these types of libraries are designed for node or the browser
and use globals from each environment to do their work
you will have to find out which globals they use and polyfill any missing functionality
depending on the library, you may have to use a bundler like browserify to make the package support amd (or more commonly umd)