diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2009-12-28 08:18:35 -0800 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2009-12-28 08:18:35 -0800 |
commit | d855f2c295e0bbb7a3b73f8dfc933a539c2a2efe (patch) | |
tree | 6d309115c206711a6e6a7bba33ac45a7eaddf9f7 /src/DotNetOpenId/HmacShaAssociation.cs | |
parent | 66f7179ed6fa8bc8bcd7e831ebb8ac4548067d85 (diff) | |
parent | 360a625667a5e3fcb169710dd35536fc32df8759 (diff) | |
download | DotNetOpenAuth-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/HmacShaAssociation.cs')
-rw-r--r-- | src/DotNetOpenId/HmacShaAssociation.cs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/DotNetOpenId/HmacShaAssociation.cs b/src/DotNetOpenId/HmacShaAssociation.cs index a754aca..dd66900 100644 --- a/src/DotNetOpenId/HmacShaAssociation.cs +++ b/src/DotNetOpenId/HmacShaAssociation.cs @@ -1,5 +1,6 @@ using System;
using System.Diagnostics;
+using System.Collections.Generic;
using System.Security.Cryptography;
namespace DotNetOpenId {
@@ -14,7 +15,7 @@ namespace DotNetOpenId { /// </summary>
internal int SecretLength { get { return BaseHashAlgorithm.HashSize / 8; } }
}
- static HmacSha[] HmacShaAssociationTypes = {
+ static HmacSha[] HmacShaAssociationTypes = new List<HmacSha> {
new HmacSha {
CreateHasher = secretKey => new HMACSHA512(secretKey),
GetAssociationType = protocol => protocol.Args.SignatureAlgorithm.HMAC_SHA512,
@@ -35,7 +36,7 @@ namespace DotNetOpenId { GetAssociationType = protocol => protocol.Args.SignatureAlgorithm.HMAC_SHA1,
BaseHashAlgorithm = new SHA1Managed(),
},
- };
+ }.ToArray();
public static HmacShaAssociation Create(Protocol protocol, string associationType,
string handle, byte[] secret, TimeSpan totalLifeLength) {
@@ -142,4 +143,4 @@ namespace DotNetOpenId { return typeIdentity.CreateHasher(SecretKey);
}
}
-}
\ No newline at end of file +}
|