Example #1
0
 internal static void VerifyChallenge(OpensignAbstractSignature signature, string challenge)
 {
     var challengeProperty = signature.SignatureProperties["challenge"];
     if (challengeProperty == null || challengeProperty.Value != challenge)
     {
         throw new ChallengeDoesNotMatchException("Challenge does not match expected value or expected value is null, expected=" + challenge + ", actual=" + (challengeProperty == null ? "null" : challengeProperty.Value));
     }
 }
Example #2
0
 private static void VerifySignature(OpensignAbstractSignature signature)
 {
     if (!signature.Verify())
     {
         throw new ArgumentException("sign signature is not valid");
     }
 }