예제 #1
0
 /// <summary>
 /// Verify a token.
 /// </summary>
 /// <param name="token">Token.</param>
 /// <returns></returns>
 public static bool VerifyToken(ALEXFWToken token)
 {
     if (token == null)
     {
         throw new ArgumentNullException("token");
     }
     return(VerifyToken(token.GetTokenData(), token.Salt, token.Signature));
 }
예제 #2
0
 /// <summary>
 /// Write token signature data.
 /// </summary>
 /// <param name="token">Token.</param>
 public static void WriteTokenSignature(ALEXFWToken token)
 {
     byte[] data = token.GetTokenData();
     token.NewSalt();
     token.Signature = GetTokenSignature(data, token.Salt);
 }