[Modify] Replace it
This commit is contained in:
parent
4ce742e1b9
commit
ff8311511b
@ -188,13 +188,9 @@ namespace WebSocketSharp.Net
|
|||||||
|
|
||||||
private static RSACryptoServiceProvider createRSAFromFile (string filename)
|
private static RSACryptoServiceProvider createRSAFromFile (string filename)
|
||||||
{
|
{
|
||||||
byte[] pvk = null;
|
|
||||||
using (var fs = File.Open (filename, FileMode.Open, FileAccess.Read, FileShare.Read)) {
|
|
||||||
pvk = new byte[fs.Length];
|
|
||||||
fs.Read (pvk, 0, pvk.Length);
|
|
||||||
}
|
|
||||||
|
|
||||||
var rsa = new RSACryptoServiceProvider ();
|
var rsa = new RSACryptoServiceProvider ();
|
||||||
|
|
||||||
|
var pvk = File.ReadAllBytes (filename);
|
||||||
rsa.ImportCspBlob (pvk);
|
rsa.ImportCspBlob (pvk);
|
||||||
|
|
||||||
return rsa;
|
return rsa;
|
||||||
|
Loading…
Reference in New Issue
Block a user