コード例 #1
0
 /// <summary>
 /// Parses and verifies the tampering protected URI.
 /// </summary>
 /// <param name="protectedUri">The tampering protected URI.</param>
 /// <param name="securityKey">The security key to use in the decryption of the <paramref name="token"/>.</param>
 /// <param name="token">The security token to decrypt and parse for a <see cref="SecurityToken"/>.</param>
 /// <param name="iv">The initialization vector (IV) to use in the decryption of the <paramref name="token"/>.</param>
 /// <param name="salt">The salt used in the computation of the integrity verification of <paramref name="protectedUri"/>.</param>
 /// <param name="hash">The checksum to verify the integrity of <paramref name="protectedUri"/>.</param>
 /// <exception cref="SecurityException">This exception is thrown when an unsucessfull parse is meet, hence values has been tampered with, <paramref name="protectedUri"/> is invalid, token has expired or one or more of the necessary parameters is missing.</exception>
 public static void VerifyProtectedUri(this Uri protectedUri, byte[] securityKey, string token, string iv, string salt, string hash)
 {
     WebSecurityUtility.ParseTamperingProtectedUri(protectedUri, securityKey, token, iv, salt, hash);
 }
コード例 #2
0
 /// <summary>
 /// Parses and verifies the tampering protected URI.
 /// </summary>
 /// <param name="protectedUri">The tampering protected URI.</param>
 /// <param name="securityKey">The security key to use in the decryption of the <paramref name="token"/>.</param>
 /// <param name="token">The security token to decrypt and parse for a <see cref="SecurityToken"/>.</param>
 /// <param name="iv">The initialization vector (IV) to use in the decryption of the <paramref name="token"/>.</param>
 /// <param name="salt">The salt used in the computation of the integrity verification of <paramref name="protectedUri"/>.</param>
 /// <param name="hash">The checksum to verify the integrity of <paramref name="protectedUri"/>.</param>
 /// <param name="algorithmType">The hash algorithm to use for the <paramref name="protectedUri"/> checksum computation. Default is <b><see cref="HashAlgorithmType.SHA1"/></b>.</param>
 /// <param name="querystringParameterHashName">The name of the checksum parameter to remove from the <paramref name="protectedUri"/> before integrity verification. Default is <b>hash</b>.</param>
 /// <exception cref="SecurityException">This exception is thrown when an unsucessfull parse is meet, hence values has been tampered with, <paramref name="protectedUri"/> is invalid, token has expired or one or more of the necessary parameters is missing.</exception>
 public static void VerifyProtectedUri(this Uri protectedUri, byte[] securityKey, string token, string iv, string salt, string hash, HashAlgorithmType algorithmType, string querystringParameterHashName)
 {
     WebSecurityUtility.ParseTamperingProtectedUri(protectedUri, securityKey, token, iv, salt, hash, algorithmType, querystringParameterHashName);
 }
コード例 #3
0
 /// <summary>
 /// Parses and verifies the tampering protected URI.
 /// </summary>
 /// <param name="protectedUri">The tampering protected URI.</param>
 /// <param name="securityKey">The security key to use in the decryption of the <paramref name="token"/>.</param>
 /// <param name="token">The security token to decrypt and parse for a <see cref="SecurityToken"/>.</param>
 /// <exception cref="SecurityException">This exception is thrown when an unsucessfull parse is meet, hence values has been tampered with, <paramref name="protectedUri"/> is invalid, token has expired or one or more of the necessary parameters is missing.</exception>
 public static void VerifyProtectedUri(this Uri protectedUri, byte[] securityKey, string token)
 {
     WebSecurityUtility.ParseTamperingProtectedUri(protectedUri, securityKey, token);
 }