How to encrypt /decrypt Passwords?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2024 03:59 AM
Hai I am using the run script for reset AD password through workflow but in script we are used the GlideEncrypter but servicenow The GlideEncrypter API is planned for deprecation so how to modify that script
script:
//Generate Random Password and Set AD password.
var encr= new GlideEncrypter();
var clearString = new PwdCryptoSecureAutoGenPassword().generatePassword();
var encrString = encr.encrypt(clearString); //Encrypted password for use in the Set AD Password Activity.
workflow.scratchpad.pass = encrString; //Set scratchpad password variable to the encrypted password string.
var decrString = workflow.scratchpad.clearpass = encr.decrypt(encrString); //Can be used as the clear text password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2024 04:29 AM - edited 12-09-2024 04:29 AM
Hi @siva44 ,
Refer below links:
Mark it as helpful and solution proposed if it serves your purpose.
Thanks,
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2024 04:00 PM
@siva44 Did you find any solutions that work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2024 09:21 PM
Hi @siva44
You could have a Password2 type system property defined and get the property value within the workflow by using
workflow.scratchpad.pass = gs.getProperty('name of the property');
Thanks and Regards
Amit Verma
Please mark this response as correct and helpful if it assisted you with your question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-15-2024 09:36 PM
Hi @Amit Verma okay But How to store in system property those auto generate passowords