Generate HmacSHA1 Password | Convert Binary to HexadecimalDescriptionGenerate HmacSHA1 Password creating hash and converting binary hash to hexadecimal. var mac = new GlideCertificateEncryption;var key = GlideStringUtil.base64Encode(skey);var hash = mac.generateMac(key, "HmacSHA1", "hmac_string");var digest = new GlideDigest();hash = GlideStringUtil.base64Decode(hash);var password = digest.getSHA1Hex().toLowerCase();CausegetSHA1Hex() does not convert Base64 to Hexadecimal.We need to use GlideStringUtil.toHexString(GlideStringUtil.base64DecodeAsBytes(hash)); to get password instead using GlideDigest. But GlideStringUtil.toHexString can be only access from maint users.Resolutionvar mac = new GlideCertificateEncryption;var key = GlideStringUtil.base64Encode(skey);var hash = mac.generateMac(key, "HmacSHA1", hmac_string); var password = toHexString(hash); function toHexString(base64) {// Decode base64 to binaryvar binaryData = GlideStringUtil.base64DecodeAsBytes(base64);// Convert binary to hexadecimalvar hex = '';for (var i = 0; i < binaryData.length; i++) {var byteValue = binaryData[i];var hexString = ('0' + (byteValue & 0xFF).toString(16)).slice(-2); // Convert byte to hexadecimalhex += hexString;}return hex;}Additional InformationGlideCertificateEncryption() GlideDigest()