Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
myloveCc committed Jan 23, 2018
2 parents 4024a87 + 74300b8 commit 13349e0
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,11 @@ Install-Package NETCore.Encrypt -Version 2.0.2
var publicKey = rsaKey.PublicKey;
var srcString = "rsa encrypt";


var encrypted = EncryptProvider.RSAEncrypt(publicKey, srcString);

// On mac/linux at version 2.0.5
var encrypted = EncryptProvider.RSAEncrypt(publicKey, srcString, RSAEncryptionPadding.Pkcs1);
```

- #### RSA decrypt
Expand All @@ -121,6 +125,9 @@ Install-Package NETCore.Encrypt -Version 2.0.2
var encryptedStr = "xxxx";

var decrypted = EncryptProvider.RSADecrypt(privateKey, encryptedStr);

// On mac/linux at version 2.0.5
var encrypted = EncryptProvider.RSADecrypt(privateKey, encryptedStr, RSAEncryptionPadding.Pkcs1);
```

- #### RSA from string (add at version 2.0.1)
Expand Down

0 comments on commit 13349e0

Please sign in to comment.