summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenId/DiffieHellmanUtil.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-12-28 08:18:35 -0800
committerAndrew Arnott <andrewarnott@gmail.com>2009-12-28 08:18:35 -0800
commitd855f2c295e0bbb7a3b73f8dfc933a539c2a2efe (patch)
tree6d309115c206711a6e6a7bba33ac45a7eaddf9f7 /src/DotNetOpenId/DiffieHellmanUtil.cs
parent66f7179ed6fa8bc8bcd7e831ebb8ac4548067d85 (diff)
parent360a625667a5e3fcb169710dd35536fc32df8759 (diff)
downloadDotNetOpenAuth-origin/v2.6.zip
DotNetOpenAuth-origin/v2.6.tar.gz
DotNetOpenAuth-origin/v2.6.tar.bz2
Merge branch 'v2.5' into v2.6origin/v2.6
Conflicts: src/version.txt
Diffstat (limited to 'src/DotNetOpenId/DiffieHellmanUtil.cs')
-rw-r--r--src/DotNetOpenId/DiffieHellmanUtil.cs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/DotNetOpenId/DiffieHellmanUtil.cs b/src/DotNetOpenId/DiffieHellmanUtil.cs
index ac3bcff..492f757 100644
--- a/src/DotNetOpenId/DiffieHellmanUtil.cs
+++ b/src/DotNetOpenId/DiffieHellmanUtil.cs
@@ -1,5 +1,6 @@
using System;
using System.Globalization;
+using System.Collections.Generic;
using System.Security.Cryptography;
using Org.Mentalis.Security.Cryptography;
@@ -17,12 +18,12 @@ namespace DotNetOpenId {
internal readonly HashAlgorithm Algorithm;
}
- static DHSha[] DiffieHellmanSessionTypes = {
+ static DHSha[] DiffieHellmanSessionTypes = new List<DHSha> {
new DHSha(new SHA512Managed(), protocol => protocol.Args.SessionType.DH_SHA512),
new DHSha(new SHA384Managed(), protocol => protocol.Args.SessionType.DH_SHA384),
new DHSha(new SHA256Managed(), protocol => protocol.Args.SessionType.DH_SHA256),
new DHSha(new SHA1Managed(), protocol => protocol.Args.SessionType.DH_SHA1),
- };
+ }.ToArray();
public static HashAlgorithm Lookup(Protocol protocol, string name) {
foreach (DHSha dhsha in DiffieHellmanSessionTypes) {