示例#1
0
 private static void VerifySignature(OpensignAbstractSignature signature)
 {
     if (!signature.Verify())
     {
         throw new ArgumentException("sign signature is not valid");
     }
 }
示例#2
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));
            }
        }