How I can do this in SuiteScript 2.0 I want to enc...
# suitescript
h
How I can do this in SuiteScript 2.0 I want to encrypt my string in "sha1" so I can compare encrypted string with NetSuite password field value
b
You cant
NlapiEncrypt was replaced and the sha1 option deprecated
h
Then how we can do this in 2.0, is there any alternative workaround?
b
Depends on what you want
You can implement your own hmac using N/crypto
Its no worse than what netsuite implemented, but falls far short of password security standards
Your passwords would fall under the replace asap if data breach category
h
I have created a custom field of type password.. and set the value from NetSuite UI, after saving the record it encrypts the value automatically. Now I want to compare my string with that encrypted password in 2.0
b
Asking your original question still gets you the same response
You cant, do the hashing yourself
h
Okay get it Mr:@battk Thanks for your informative response 🙂