diff --git a/src/chocolatey/infrastructure/cryptography/DefaultEncryptionUtility.cs b/src/chocolatey/infrastructure/cryptography/DefaultEncryptionUtility.cs index c4ee408a5..211e6b831 100644 --- a/src/chocolatey/infrastructure/cryptography/DefaultEncryptionUtility.cs +++ b/src/chocolatey/infrastructure/cryptography/DefaultEncryptionUtility.cs @@ -61,6 +61,11 @@ This is can be because the machine keyfile cannot be written as a normal user. public string DecryptString(string encryptedString) { + if (string.IsNullOrEmpty(encryptedString)) + { + return null; + } + var encryptedByteArray = Convert.FromBase64String(encryptedString); byte[] decryptedByteArray;