예제 #1
0
 /// <summary>
 /// Verifies the specified raw data.
 /// </summary>
 /// <param name="rawData">The raw data.</param>
 /// <param name="signature">The signature.</param>
 /// <returns></returns>
 public bool Verify(string rawData, WebBase64 signature)
 {
     return(Verify(RawStringEncoding.GetBytes(rawData), signature.ToBytes()));
 }
예제 #2
0
 /// <summary>
 /// Signs the specified raw data.
 /// </summary>
 /// <param name="rawData">The raw data.</param>
 /// <param name="hidden">The hidden data used to generate the digest signature.</param>
 /// <returns></returns>
 public WebBase64 Sign(String rawData, Byte[] hidden = null)
 {
     return(WebBase64.FromBytes(Sign(RawStringEncoding.GetBytes(rawData), hidden)));
 }
예제 #3
0
 /// <summary>
 /// Signs the specified raw data.
 /// </summary>
 /// <param name="rawData">The raw data.</param>
 /// <param name="expiration">The expiration.</param>
 /// <returns></returns>
 public WebBase64 Sign(String rawData, DateTime expiration)
 {
     return(WebBase64.FromBytes(Sign(RawStringEncoding.GetBytes(rawData), expiration)));
 }
예제 #4
0
 /// <summary>
 /// Encrypts the specified raw string data.
 /// </summary>
 /// <param name="rawData">The raw string data.</param>
 /// <returns></returns>
 public WebBase64 Encrypt(string rawData)
 {
     return(WebBase64.FromBytes(Encrypt(RawStringEncoding.GetBytes(rawData))));
 }
예제 #5
0
 /// <summary>
 /// Signs the specified raw data.
 /// </summary>
 /// <param name="rawData">The raw data.</param>
 /// <returns></returns>
 public WebBase64 Sign(String rawData)
 {
     return(WebBase64.FromBytes(Sign(RawStringEncoding.GetBytes(rawData))));
 }