summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OAuth
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2012-07-18 08:11:59 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2012-07-18 08:11:59 -0700
commit8837d7fb4d61525c9bddc4fed8300a1bb9978ffa (patch)
treec1da80e194e6dd4b1cfce26daf989b37f901998b /src/DotNetOpenAuth.OAuth
parent72a8bc9b9801202e6bf3471fb4527a1bccb99cea (diff)
downloadDotNetOpenAuth-8837d7fb4d61525c9bddc4fed8300a1bb9978ffa.zip
DotNetOpenAuth-8837d7fb4d61525c9bddc4fed8300a1bb9978ffa.tar.gz
DotNetOpenAuth-8837d7fb4d61525c9bddc4fed8300a1bb9978ffa.tar.bz2
Replaces explicit crypto algorithm use with factories.
Fixes #47 which requires that FIPS compliance be an option.
Diffstat (limited to 'src/DotNetOpenAuth.OAuth')
-rw-r--r--src/DotNetOpenAuth.OAuth/OAuth/ChannelElements/HmacSha1SigningBindingElement.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth.OAuth/OAuth/ChannelElements/HmacSha1SigningBindingElement.cs b/src/DotNetOpenAuth.OAuth/OAuth/ChannelElements/HmacSha1SigningBindingElement.cs
index 64e8a77..ee05614 100644
--- a/src/DotNetOpenAuth.OAuth/OAuth/ChannelElements/HmacSha1SigningBindingElement.cs
+++ b/src/DotNetOpenAuth.OAuth/OAuth/ChannelElements/HmacSha1SigningBindingElement.cs
@@ -34,7 +34,7 @@ namespace DotNetOpenAuth.OAuth.ChannelElements {
[SuppressMessage("Microsoft.Reliability", "CA2000:Dispose objects before losing scope", Justification = "False positive.")]
protected override string GetSignature(ITamperResistantOAuthMessage message) {
string key = GetConsumerAndTokenSecretString(message);
- using (HashAlgorithm hasher = new HMACSHA1(Encoding.ASCII.GetBytes(key))) {
+ using (var hasher = HmacAlgorithms.Create(HmacAlgorithms.HmacSha1, Encoding.ASCII.GetBytes(key))) {
string baseString = ConstructSignatureBaseString(message, this.Channel.MessageDescriptions.GetAccessor(message));
byte[] digest = hasher.ComputeHash(Encoding.ASCII.GetBytes(baseString));
return Convert.ToBase64String(digest);