public string ResolveApplicationKey(string keyName) { var currentEncryptionKey = ApplicationKeys?.SingleOrDefault(a => a.Key == keyName); if (currentEncryptionKey == null) { throw new Exception($"Could not retrieve the requested application key [{keyName}]"); } return(currentEncryptionKey.Value.Value); }