How to use/replace GlideEncrypter for scoped app?

aklimenko
Mega Expert

We use GlideEncrypter in these cases. Is it supported in scoped app or how can we rewrite it?

1. encrypter.reencryptForAutomation() to encrypt pass

2. new GlideEncrypter().decrypt(creds.password); to decrypt

22 REPLIES 22

What I would like to know is if there is a way to encrypt a value so you can do a compare against a Password1 field.   I have a need to store the last 4 SSN and I figured why deal with encryption contexts when all I would like to do is store the value encrypted and just compare to it by encrypting the value I want to compare in the same way.


Che Pazzo
ServiceNow Employee
ServiceNow Employee

I hate to be the "me too" guy, but did you ever figure this out? I can't seem to find any documentation on how to do this. I may have to dismiss the password1 field as worthless and just use password2.



What's the point of storing a 1-way password if I can't do this?


I concluded that the Password1 field type was worthless from my perspective because I could find no way to encrypt the value and then compare it to the Password1 field value.   I did find that I could use GlideEncrypter to encrypt the value and compare it to a Password2 field.   But you can just get the decrypted value of the Password2 field and do a compare in clear text between the two values also.



If you are working in a Scoped app things are even worse.