/// <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)); }
/// <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); }