diff options
Diffstat (limited to 'src/DotNetOpenId/DiffieHellmanUtil.cs')
-rw-r--r-- | src/DotNetOpenId/DiffieHellmanUtil.cs | 5 |
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) {
|