diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2008-08-13 04:25:00 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2008-08-13 04:25:00 -0700 |
commit | fd6acdc9b14b51fc0bf4c1b4fa815cc1f0d7ce26 (patch) | |
tree | a345806393382207e9d75a14f820457906f5878e /src/DotNetOpenId/Protocol.cs | |
parent | ba48275ccaae1218b1e8574029f7e009eb3f8735 (diff) | |
download | DotNetOpenAuth-fd6acdc9b14b51fc0bf4c1b4fa815cc1f0d7ce26.zip DotNetOpenAuth-fd6acdc9b14b51fc0bf4c1b4fa815cc1f0d7ce26.tar.gz DotNetOpenAuth-fd6acdc9b14b51fc0bf4c1b4fa815cc1f0d7ce26.tar.bz2 |
Made HMAC-SHA association types a table instead of several classes.
Diffstat (limited to 'src/DotNetOpenId/Protocol.cs')
-rw-r--r-- | src/DotNetOpenId/Protocol.cs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/DotNetOpenId/Protocol.cs b/src/DotNetOpenId/Protocol.cs index 5d3811c..78ad91b 100644 --- a/src/DotNetOpenId/Protocol.cs +++ b/src/DotNetOpenId/Protocol.cs @@ -287,6 +287,16 @@ namespace DotNetOpenId { public string HMAC_SHA256 = null;
public string HMAC_SHA384 = null;
public string HMAC_SHA512 = null;
+ public string Best {
+ get {
+ foreach (string algorithmName in All) {
+ if (algorithmName != null) {
+ return algorithmName;
+ }
+ }
+ throw new OpenIdException(); // really bad... we have no signing algorithms at all
+ }
+ }
}
internal class Modes {
public string cancel = "cancel";
|