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