ReadSecretFile() static private method

static private ReadSecretFile ( string filePath, System.Security.Cryptography.DataProtector protector ) : Task
filePath string
protector System.Security.Cryptography.DataProtector
return Task
Example #1
0
        private async Task <Secret> UnauditedReadSecret(SecretName name, string fileName)
        {
            if (!File.Exists(fileName))
            {
                return(null);
            }

            // Read the file
            var protector = CreateProtector(name);

            return(JsonFormat.Deserialize <Secret>(await DpapiSecretStoreProvider.ReadSecretFile(fileName, protector)));
        }