Ah, it looks like VB.NET uses 160-bit SHA-1, which is 20 bytes/characters,
compared to CF's 28 characters.
As pointed out by Greg, Adobe Exchange has a SHA-1 custom tag, and that is
160-bit so should match the value that VB.NET is producing:
http://www.adobe.com/cfusion/exchange/index.cfm#view=s
> Can anyone help me to convert this VB.NEt code to Coldfusion code. I'm
> trying to do it but the output is dosn't same.
[snip]
> [VB.Net] Output:WbwSWEBzPqgo9C4nZmGwHhd/FBQ=
I fired up VS 2005 and created a new console app with the code you posted, and
the output I got from the VB.NET program
>Be careful with encryption moving from .Net to CF and vice versa. Just
>because the one names the algorithm the same way as the other it doesn't
>follow that you can just encrypt in one and decrypt in the other.
There are differences in formatting and such (Base64 output vs. hex strings,
for exa
go to the Macromedia (Adobe) exchange and look for SHA-1.. there's
already code that hashes strings using the SHA-1 algorithm.
I actually utilized it and converted the CF to VB 6 for a project.
On 10/2/06, Peter Boughton <[EMAIL PROTECTED]> wrote:
> Are you certain that the VB.NET output is SHA-1
Are you certain that the VB.NET output is SHA-1 and that you've copied the
complete input string correctly?
Here's how I would do what you've got in VB with CF:
testString = "SENTRYORD01154321SENTRYORD01154321";
HashValue = Hash(testString,'SHA-1','UTF-8');
sa = ToBase64
>Try using SHA instead of MD5?
>
>On 10/2/06, Juman Lop <[EMAIL PROTECTED]> wrote:
>
>
>--
>CFAJAX docs and other useful articles:
>http://www.bifrost.com.au/blog/
I have been trying to change the MD5 with Sha but the output is still do not
work properly.
~~
Be careful with encryption moving from .Net to CF and vice versa. Just
because the one names the algorithm the same way as the other it doesn't
follow that you can just encrypt in one and decrypt in the other.
For example, the MD5 hash used in CF is a short version that uses
hexedecimal notation.
Try using SHA instead of MD5?
On 10/2/06, Juman Lop <[EMAIL PROTECTED]> wrote:
> Can anyone help me to convert this VB.NEt code to Coldfusion code. I'm trying
> to do it but the output is dosn't same.
> VB.NET cod:
> ''
> Input: SE
8 matches
Mail list logo