summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2009-08-05 22:12:49 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2009-08-05 22:12:49 -0700
commita2bc2163b1741845df8eaf1e6216e74a8a70a278 (patch)
tree4723eb0b857004b3f16c7ae0f57de08886cd3a0a /src
parent6b8ae6879edc652d445e003783775ec6222d8b3d (diff)
parenta1513732aff8dc75c026bef440083bcaafc73b60 (diff)
downloadDotNetOpenAuth-a2bc2163b1741845df8eaf1e6216e74a8a70a278.zip
DotNetOpenAuth-a2bc2163b1741845df8eaf1e6216e74a8a70a278.tar.gz
DotNetOpenAuth-a2bc2163b1741845df8eaf1e6216e74a8a70a278.tar.bz2
Merge branch 'v3.1' into v3.2
Diffstat (limited to 'src')
-rw-r--r--src/DotNetOpenAuth/OpenId/DiffieHellmanUtilities.cs4
-rw-r--r--src/DotNetOpenAuth/OpenId/HmacShaAssociation.cs4
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.)