Beispiel #1
0
 /// <summary>
 /// Verify with UTF-8
 /// </summary>
 /// <param name="data"></param>
 /// <param name="sign"></param>
 /// <param name="publicKey"></param>
 /// <param name="hashAlgorithmName"></param>
 /// <returns></returns>
 public static bool Verify(string data, string sign, string publicKey, HashAlgorithmName hashAlgorithmName)
 {
     return(RSACommon.Verify(data, sign, publicKey, Encoding.UTF8, hashAlgorithmName));
 }
Beispiel #2
0
 public static string SignWithSHA1(string data, string privateKey)
 {
     return(RSACommon.Sign(data, privateKey, Encoding.UTF8, HashAlgorithmName.SHA1));
 }
Beispiel #3
0
 public static string SignWithSHA256(string data, string privateKey, Encoding encoding)
 {
     return(RSACommon.Sign(data, privateKey, encoding, HashAlgorithmName.SHA256));
 }
Beispiel #4
0
 /// <summary>
 /// Sign with UTF-8
 /// </summary>
 /// <param name="data"></param>
 /// <param name="privateKey"></param>
 /// <param name="hashAlgorithmName"></param>
 /// <returns></returns>
 public static string Sign(string data, string privateKey, HashAlgorithmName hashAlgorithmName)
 {
     return(RSACommon.Sign(data, privateKey, Encoding.UTF8, hashAlgorithmName));
 }
Beispiel #5
0
 public static string Decrypt(string source, string privateKey)
 {
     return(RSACommon.Decrypt(source, privateKey));
 }
Beispiel #6
0
 public static string Encrypt(string source, string publicKey)
 {
     return(RSACommon.Encrypt(source, publicKey));
 }
Beispiel #7
0
 public static bool VerifyWithSHA256(string data, string sign, string publicKey, Encoding encoding)
 {
     return(RSACommon.Verify(data, sign, publicKey, encoding, HashAlgorithmName.SHA256));
 }
Beispiel #8
0
 /// <summary>
 /// Verify with UTF-8
 /// </summary>
 /// <param name="data"></param>
 /// <param name="sign"></param>
 /// <param name="publicKey"></param>
 /// <returns></returns>
 public static bool VerifyWithSHA1(string data, string sign, string publicKey)
 {
     return(RSACommon.Verify(data, sign, publicKey, Encoding.UTF8, HashAlgorithmName.SHA1));
 }