diff --git a/data/reusables/audit_log/generating-hash-for-a-token.md b/data/reusables/audit_log/generating-hash-for-a-token.md index 97c9200fed74..e29164f3e7a7 100644 --- a/data/reusables/audit_log/generating-hash-for-a-token.md +++ b/data/reusables/audit_log/generating-hash-for-a-token.md @@ -14,6 +14,6 @@ Param ( $hasher = [System.Security.Cryptography.HashAlgorithm]::Create('sha256') $hash = $hasher.ComputeHash([System.Text.Encoding]::UTF8.GetBytes($ClearString)) -$hashString = [System.BitConverter]::ToString($hash) -$hashString.Replace('-', '') +$hashString = [System.Convert]::ToBase64String($hash) +$hashString ```