We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ae4de01 commit 534afa3Copy full SHA for 534afa3
test/NETCore.Encrypt.Tests/RSA_Tests.cs
@@ -241,6 +241,7 @@ public void Rsa_SignAndVerify_Test()
241
{
242
//Act
243
var rawStr = "123456";
244
+ var rawStr1 = "123457";
245
246
var rsaKey = EncryptProvider.CreateRsaKey();
247
var privateKey = rsaKey.PrivateKey;
@@ -249,10 +250,12 @@ public void Rsa_SignAndVerify_Test()
249
250
var signStr = EncryptProvider.RSASign(rawStr, privateKey);
251
252
var result = EncryptProvider.RSAVerify(rawStr, signStr, publicKey);
253
+ var errorResult = EncryptProvider.RSAVerify(rawStr1, signStr, publicKey);
254
255
//Assert
256
Assert.NotEmpty(signStr);
257
Assert.True(result);
258
+ Assert.False(errorResult);
259
}
260
261
[Theory(DisplayName = "Rsa to pem test")]
0 commit comments