Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
myloveCc authored Jan 23, 2018
1 parent ca37c0c commit 74300b8
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 74300b8

Please sign in to comment.