AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

File Standard Library
Goto page Previous  1, 2
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
olfen



Joined: 04 Jun 2005
Posts: 99
Location: Stuttgart, Germany

PostPosted: Wed Sep 26, 2007 6:46 pm    Post subject: Reply with quote

Thanks, Sean!
Back to top
View user's profile Send private message Visit poster's website
Sean



Joined: 12 Feb 2007
Posts: 1336

PostPosted: Mon Oct 01, 2007 6:51 am    Post subject: Reply with quote

I combined the recent AES.ahk and Hash.ahk into StandardLibrary File.ahk.

Example:
Code:
sFileOriginl   := A_AhkPath    ; Specify the real file path here!
sPassword   := "AutoHotkey"    ; Specify your own password here!

SID := 128   ; 128bit AES
sFileEncrypt := A_Temp . "\encrypt" . SID . ".bin"    ; Specify encrypted file path.
sFileDecrypt := A_Temp . "\decrypt" . SID . ".exe"    ; Specify decrypted file path.
File_AES(sFileOriginl, sFileEncrypt, sPassword, SID, True)    ; Encryption
File_AES(sFileEncrypt, sFileDecrypt, sPassword, SID, False)   ; Decryption

SID := 192   ; 192bit AES
sFileEncrypt := A_Temp . "\encrypt" . SID . ".bin"
sFileDecrypt := A_Temp . "\decrypt" . SID . ".exe"
File_AES(sFileOriginl, sFileEncrypt, sPassword, SID, True)    ; Encryption
File_AES(sFileEncrypt, sFileDecrypt, sPassword, SID, False)   ; Decryption

SID := 256   ; 256bit AES
sFileEncrypt := A_Temp . "\encrypt" . SID . ".bin"
sFileDecrypt := A_Temp . "\decrypt" . SID . ".exe"
File_AES(sFileOriginl, sFileEncrypt, sPassword, SID, True)    ; Encryption
File_AES(sFileEncrypt, sFileDecrypt, sPassword, SID, False)   ; Decryption

MsgBox, % "CRC32:`t"   . File_Hash(sFileOriginl, "CRC32")   . "`n"
   . "MD5:`t"   . File_Hash(sFileOriginl, "MD5")   . "`n"
   . "SHA1:`t"   . File_Hash(sFileOriginl, "SHA1")   . "`n"
Back to top
View user's profile Send private message
Theolonious



Joined: 05 Jan 2008
Posts: 2
Location: syracuse,ny

PostPosted: Tue Jan 08, 2008 8:34 pm    Post subject: Reply with quote

[quote="majkinetor"]
Quote:


Sad to know you have grown up. My deepest symphaties. Crying or Very sad


I tell my Girlfriend that all men are 12 years old. Otherwise we would not have so many toys. 13 is bad luck and over the hill.


My apologies for posting to an old message but i could not resist.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group