diff options
author | David Hook <dgh@cryptoworkshop.com> | 2014-01-15 21:13:21 +1100 |
---|---|---|
committer | David Hook <dgh@cryptoworkshop.com> | 2014-01-15 21:13:21 +1100 |
commit | e9fdb6f37ce8b97319bae0ada748dfecd9458770 (patch) | |
tree | ed7074a721818319ef3ca85a544d7fb05026c240 /crypto/src/openpgp/PgpUtilities.cs | |
parent | added Camellia tags (diff) | |
download | BouncyCastle.NET-ed25519-e9fdb6f37ce8b97319bae0ada748dfecd9458770.tar.xz |
added Camellia tags
Diffstat (limited to '')
-rw-r--r-- | crypto/src/openpgp/PgpUtilities.cs | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/crypto/src/openpgp/PgpUtilities.cs b/crypto/src/openpgp/PgpUtilities.cs index 7cd3dfc4f..32e37b819 100644 --- a/crypto/src/openpgp/PgpUtilities.cs +++ b/crypto/src/openpgp/PgpUtilities.cs @@ -97,7 +97,7 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp return GetDigestName(hashAlgorithm) + "with" + encAlg; } - public static string GetSymmetricCipherName( + public static string GetSymmetricCipherName( SymmetricKeyAlgorithmTag algorithm) { switch (algorithm) @@ -124,12 +124,18 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp return "AES"; case SymmetricKeyAlgorithmTag.Twofish: return "Twofish"; + case SymmetricKeyAlgorithmTag.Camellia128: + return "Camellia"; + case SymmetricKeyAlgorithmTag.Camellia192: + return "Camellia"; + case SymmetricKeyAlgorithmTag.Camellia256: + return "Camellia"; default: throw new PgpException("unknown symmetric algorithm: " + algorithm); } } - public static int GetKeySize(SymmetricKeyAlgorithmTag algorithm) + public static int GetKeySize(SymmetricKeyAlgorithmTag algorithm) { int keySize; switch (algorithm) @@ -142,14 +148,17 @@ namespace Org.BouncyCastle.Bcpg.OpenPgp case SymmetricKeyAlgorithmTag.Blowfish: case SymmetricKeyAlgorithmTag.Safer: case SymmetricKeyAlgorithmTag.Aes128: + case SymmetricKeyAlgorithmTag.Camellia128: keySize = 128; break; case SymmetricKeyAlgorithmTag.TripleDes: case SymmetricKeyAlgorithmTag.Aes192: + case SymmetricKeyAlgorithmTag.Camellia192: keySize = 192; break; case SymmetricKeyAlgorithmTag.Aes256: case SymmetricKeyAlgorithmTag.Twofish: + case SymmetricKeyAlgorithmTag.Camellia256: keySize = 256; break; default: |