0
var encryptedPass,
    decryptedPass,
    Encrypter = new GlideEncrypter(),
    grBasicAuthProfile = new GlideRecord('sys_auth_profile_basic');
 grBasicAuthProfile.get('cf1f0fe44705b1100d901d98036d43a7');
encryptedPass = grBasicAuthProfile.getValue('password');
 decryptedPass = Encrypter.decrypt(encryptedPass);
 gs.print(decryptedPass);

How to get encrypted Password in decrypted Format ServiceNow
Working Code Asked question August 31, 2023