diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-08-05 22:06:52 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-08-05 22:06:52 -0700 |
commit | a1513732aff8dc75c026bef440083bcaafc73b60 (patch) | |
tree | c59aa6327aa410e9e8c350ee8cb371b5cffb957f /src | |
parent | 2847bf5a7d5103ba8694f6b0347047273646e4ee (diff) | |
parent | 0aedb0da7764bc42761384c43404be15063aad40 (diff) | |
download | DotNetOpenAuth-a1513732aff8dc75c026bef440083bcaafc73b60.zip DotNetOpenAuth-a1513732aff8dc75c026bef440083bcaafc73b60.tar.gz DotNetOpenAuth-a1513732aff8dc75c026bef440083bcaafc73b60.tar.bz2 |
Merge branch 'v3.0' into v3.1
Conflicts:
build.proj
Diffstat (limited to 'src')
-rw-r--r-- | src/DotNetOpenAuth/OpenId/DiffieHellmanUtilities.cs | 4 | ||||
-rw-r--r-- | src/DotNetOpenAuth/OpenId/HmacShaAssociation.cs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/DotNetOpenAuth/OpenId/DiffieHellmanUtilities.cs b/src/DotNetOpenAuth/OpenId/DiffieHellmanUtilities.cs index a93c824..2507f38 100644 --- a/src/DotNetOpenAuth/OpenId/DiffieHellmanUtilities.cs +++ b/src/DotNetOpenAuth/OpenId/DiffieHellmanUtilities.cs @@ -21,12 +21,12 @@ namespace DotNetOpenAuth.OpenId { /// <summary> /// An array of known Diffie Hellman sessions, sorted by decreasing hash size. /// </summary> - private static DHSha[] diffieHellmanSessionTypes = { + private 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(); /// <summary> /// Finds the hashing algorithm to use given an openid.session_type value. diff --git a/src/DotNetOpenAuth/OpenId/HmacShaAssociation.cs b/src/DotNetOpenAuth/OpenId/HmacShaAssociation.cs index 16d8f74..ca46b5b 100644 --- a/src/DotNetOpenAuth/OpenId/HmacShaAssociation.cs +++ b/src/DotNetOpenAuth/OpenId/HmacShaAssociation.cs @@ -29,7 +29,7 @@ namespace DotNetOpenAuth.OpenId { /// <summary> /// A list of HMAC-SHA algorithms in order of decreasing bit lengths. /// </summary> - private static HmacSha[] hmacShaAssociationTypes = { + private static HmacSha[] hmacShaAssociationTypes = new List<HmacSha> { new HmacSha { CreateHasher = secretKey => new HMACSHA512(secretKey), GetAssociationType = protocol => protocol.Args.SignatureAlgorithm.HMAC_SHA512, @@ -50,7 +50,7 @@ namespace DotNetOpenAuth.OpenId { GetAssociationType = protocol => protocol.Args.SignatureAlgorithm.HMAC_SHA1, BaseHashAlgorithm = new SHA1Managed(), }, - }; + }.ToArray(); /// <summary> /// The specific variety of HMAC-SHA this association is based on (whether it be HMAC-SHA1, HMAC-SHA256, etc.) |