Key Size in RSA C# is not changing ! -


i generating key pair , store them in xml file using

toxmlstring(true); 

i need set key size 2048 according msdn place constructor of rsacryptoserviceprovider

    private void assignparameter(providertype providertype)     {         cspparameters cspparams;          cspparams = new cspparameters((int)providertype);         cspparams.keycontainername = rsaencryption.containername;         cspparams.flags = cspproviderflags.usemachinekeystore;         cspparams.providername = "microsoft strong cryptographic provider";         cspparams.keynumber = (int)keynumber.exchange;          this.rsa = new rsacryptoserviceprovider(2048, cspparams);     } 

when check key size using

int x = this.rsa.keysize; 

i 1024 whats wrong here??

i've seen before, try changing container name or try

using (this.rsa = new rsacryptoserviceprovider(2048, cspparams))  {  } 

or this.rsa.clear(); after done it.

if have container same name re-use container believe.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -