summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenId/Protocol.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/DotNetOpenId/Protocol.cs')
-rw-r--r--src/DotNetOpenId/Protocol.cs10
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";