|
Post by gadapchetvoi on Jan 8, 2014 20:59:07 GMT -5
VBCorlib is a great library for VB6 users like me. And this question is a very small wondering :
I've used RSACryptoServiceProvider to RSAEncrypt some data, then I wanted to clear all the sensitive data from memory by Clear function:
Dim Provider As RSACryptoServiceProvider: Set Provider = Cor.NewRSACryptoServiceProvider(2048)
Provider.FromXmlString "<RSAKeyValue><Modulus>2Y3tUbiHNGU0JhcPXrzrG63uQEQRC76QIfc1SIHph6ULRAr9A/CFGmAPWncQnX8Oy+JIeoQpys6VHVTMiAGSZiSR4hi3aTzzeTQ0HQOylI31l1plxp5oh9e2n1dDZCZIdjFxAGckLG53fAVj++NF+0gxXpiOhVZ42x/CQBPSLTgjnCEoIXc25V2n1Rm67Iam15WFgmHykaN2OtOr5oEfYVUTmFoKiKIHYfEjvYp46v8LY8zRhUWb0oVRrlAsazdzC4D0PzDJNQI9ifXmr8SLvWOnDzDt3BkBjZ3LFBuD3GiGkxoQOayixPIYD5Z4LMKxbfCi23OzA8at6wsH0qbgMw==</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>" Data = StrConv("1234567890abcdef1234567890abcdef1234567890abcdef", vbFromUnicode)
Encrypted = Provider.EncryptValue(Data) Call Provider.Clear '-- this line gives me error : "The parameter is inccorect" Set Provider = Nothing
But as you see, it gave me error "The parameter is inccorect". I've taken a look at documentation, but the function is really doesn't accept any parameter. So why am I get wrong? Please lead me to the correct place.
Thanks so much !
|
|