File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
test/NETCore.Encrypt.Tests Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -241,6 +241,7 @@ public void Rsa_SignAndVerify_Test()
241241 {
242242 //Act
243243 var rawStr = "123456" ;
244+ var rawStr1 = "123457" ;
244245
245246 var rsaKey = EncryptProvider . CreateRsaKey ( ) ;
246247 var privateKey = rsaKey . PrivateKey ;
@@ -249,10 +250,12 @@ public void Rsa_SignAndVerify_Test()
249250 var signStr = EncryptProvider . RSASign ( rawStr , privateKey ) ;
250251
251252 var result = EncryptProvider . RSAVerify ( rawStr , signStr , publicKey ) ;
253+ var errorResult = EncryptProvider . RSAVerify ( rawStr1 , signStr , publicKey ) ;
252254
253255 //Assert
254256 Assert . NotEmpty ( signStr ) ;
255257 Assert . True ( result ) ;
258+ Assert . False ( errorResult ) ;
256259 }
257260
258261 [ Theory ( DisplayName = "Rsa to pem test" ) ]
You can’t perform that action at this time.
0 commit comments