diff options
author | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-03-26 17:15:53 +0700 |
---|---|---|
committer | Peter Dettman <peter.dettman@bouncycastle.org> | 2015-03-26 17:15:53 +0700 |
commit | 47c7ecf546892d8cacadbd3ef3a946e326d6d6c2 (patch) | |
tree | 2faed9ab64b982acc0c1cf5f95167de2dadcf6f7 /crypto/src/security/DotNetUtilities.cs | |
parent | Retain the OID actually used when initialized by keysize (diff) | |
download | BouncyCastle.NET-ed25519-47c7ecf546892d8cacadbd3ef3a946e326d6d6c2.tar.xz |
Provide a KeyContainerName when creating an RSACryptoServiceProvider
- Thanks to Frederik Carlier for reporting and providing a fix (see JIRA BMA-130)
Diffstat (limited to 'crypto/src/security/DotNetUtilities.cs')
-rw-r--r-- | crypto/src/security/DotNetUtilities.cs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/crypto/src/security/DotNetUtilities.cs b/crypto/src/security/DotNetUtilities.cs index d50e17d39..732b5e075 100644 --- a/crypto/src/security/DotNetUtilities.cs +++ b/crypto/src/security/DotNetUtilities.cs @@ -233,7 +233,9 @@ namespace Org.BouncyCastle.Security private static RSA CreateRSAProvider(RSAParameters rp) { - RSACryptoServiceProvider rsaCsp = new RSACryptoServiceProvider(); + CspParameters csp = new CspParameters(); + csp.KeyContainerName = string.Format("BouncyCastle-{0}", Guid.NewGuid()); + RSACryptoServiceProvider rsaCsp = new RSACryptoServiceProvider(csp); rsaCsp.ImportParameters(rp); return rsaCsp; } |