void SetDecryptionKey (string key)
{
if ((key == null) || key.StartsWith ("AutoGenerate")) {
decryption_key = AutoGenerate (MachineKeyRegistryStorage.KeyType.Encryption);
} else {
try {
decryption_key = MachineKeySectionUtils.GetBytes (key, key.Length);
DecryptionTemplate.Key = decryption_key;
}
catch {
decryption_key = null;
throw new ArgumentException ("Invalid key length");
}
}
}