Modify

Opened 14 years ago

Closed 14 years ago

#1624 closed Bug (No Bug)

_crypt_DecryptData not working in Windows 2000

Reported by: brainwilli@… Owned by:
Milestone: Component: AutoIt
Version: 3.3.6.1 Severity: None
Keywords: _crypt_DecryptData Windows 2000 Cc:

Description

Please try the example from the AutoIt Help:

#include <Crypt.au3>
; This example shows how to decrypt a string
Local Const $bEncrypted = Binary("0x040A0D2594CE1FFC8E4CE5BC14E8724B6B5900225EA8E45CF328" & _
        "9D0D6A48E490E53FB66F39FF5CA967C5F6CD04D399AF09E18E7A91EEA32F7BBBB714DEC6865128CE3A" & _
        "4F1BB826554B69B7AC96E8AAA639656F0323E34745167F4B72FF4984A1C4B81E1F66DDD9743B9C664406D76B52")
MsgBox(0, "Decrypted data", BinaryToString(_Crypt_DecryptData($bEncrypted, "once", $CALG_RC2)))

Even Win2000 is very old, you did not stopped the support for this OS, as i can read on the homepage.
The script is running fine under XP,Vista and Win7.

Attachments (0)

Change History (4)

comment:1 Changed 14 years ago by brainwilli@…

The Bug seems to be elswhere.
I encrypted a string in Windows 2000. Then the script does the job in Windows 2000.
But the 'Windows 2000 script' does not run in Vista.
Perhaps there is some difference in encrypting under Win2000 and encrypting under XP/Vista/Win7 ?

#include <Crypt.au3>

$bEncrypted = Binary("0x09CCD9FCC87B75D3BE99588D9542CBD69344CA715E302D744BEC765610816630")

$dec=BinaryToString(_Crypt_DecryptData($bEncrypted, "SomePassword", $CALG_RC2))

MsgBox(0, "Decrypted data", $dec)

comment:2 Changed 14 years ago by brainwilli@…

Found that:
http://support.microsoft.com/?scid=kb%3Ben-us%3B841715&x=16&y=11
"
When you try to decrypt data on a computer that is running the Microsoft Windows XP operating system, and the data was encrypted by using the RC2 algorithm on a computer that is running Microsoft Windows 2000, you may not be able to decrypt the data successfully.

To be able to decrypt the data successfully, you must make an explicit call to the CryptSetKeyParam function. The CryptSetKeyParam function is defined in the Advapi32.dll file to adjust the key length for the RC2 algorithm explicitly.
"
I have the same problem with the RC4 algo...
That is not an AutoIT bug, but perhaps someone can update the help file to inform
about this issue.
(Maybe there is an workaround to get the script running....)

comment:3 Changed 14 years ago by brainwilli@…

Sorry, no bug Please close this ticket

comment:4 Changed 14 years ago by Jpm

  • Resolution set to No Bug
  • Status changed from new to closed

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.