Decoding a password

  • Thread starter Thread starter Diego F.
  • Start date Start date
D

Diego F.

Hi all.

I'm using a VB6 function in my .NET application that decodes a digit
sequence and should result in a word. The funcion uses Chr function, and I
finally get an illegible string (square symbols).

How can I convert that to letters, so I can retrieve the original password?
 
Hi all.

I'm using a VB6 function in my .NET application that decodes a digit
sequence and should result in a word. The funcion uses Chr function,
and I finally get an illegible string (square symbols).

How can I convert that to letters, so I can retrieve the original
password?

Depends on how you encrypted your password.
 
I found that the problem is the use of Format function.

In VB6, that: Format("079", "000"), returns "079". But, in VB.NET, it
returns "000".

So, I'm getting different codes and the final conversion is different.

Any idea to solve that?
 
Ok, don't ask me how many format functions there are. I put String.Format,
and now it returns the expceted value :-)
 
Diego said:
In VB6, that: Format("079", "000"), returns "079". But, in VB.NET, it
returns "000".

That's because "0" is not a valid formatting character when working with
a /String/ value (IIRC, "@" is the only one).

You must convert your value to a /numeric/ type before calling Format on
it, as in:

Format( CInt( "079" ), "000" )

HTH,
Phill W.
 
Back
Top