pixartist Posted September 4, 2008 Share Posted September 4, 2008 can i use & to append binary data to binary data (eg. 1 byte) ? if not, how to do it then`? Link to comment Share on other sites More sharing options...
BrettF Posted September 4, 2008 Share Posted September 4, 2008 Can't see why not... Maybe post your code, Cheers, Brett Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
pixartist Posted September 4, 2008 Author Share Posted September 4, 2008 Can't see why not... Maybe post your code, Cheers, Brettok the appending works now.. i made a little mistake there. still: Case $encrypt $f = FileOpenDialog("Choose File",@ScriptDir, "Any (*.*)", 1) if $f then $enc = encrypt($f, GUICtrlRead($key)) $s = FileSaveDialog( "Choose a name.", @ScriptDir, "any (*.*)", 18) if $s Then $fi= FileOpen ( $s, BitOR(16, 1) ) If $fi = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ConsoleWrite($enc) FileWrite($fi, Binary($enc)) FileClose($fi) EndIf EndIf will actually write a STRING of NUMBERS instead of binary data to a file, wtf? Link to comment Share on other sites More sharing options...
pixartist Posted September 4, 2008 Author Share Posted September 4, 2008 (edited) ok the appending works now.. i made a little mistake there. still: Case $encrypt $f = FileOpenDialog("Choose File",@ScriptDir, "Any (*.*)", 1) if $f then $enc = encrypt($f, GUICtrlRead($key)) $s = FileSaveDialog( "Choose a name.", @ScriptDir, "any (*.*)", 18) if $s Then $fi= FileOpen ( $s, BitOR(16, 1) ) If $fi = -1 Then MsgBox(0, "Error", "Unable to open file.") Exit EndIf ConsoleWrite($enc) FileWrite($fi, Binary($enc)) FileClose($fi) EndIf EndIf will actually write a STRING of NUMBERS instead of binary data to a file, wtf? omg now i see BitXOR only works on 32 bit integers -.- how can i xor with bytes ? edit: ok, perhaps like this? $erg = BitXOR(Number(BinaryMid($keybinary, $c_keybyte, 4)),Number(BinaryMid($filedata, $i, 4)))... i guess not, because the Number function will take the binary as a string? also, how do i convert a 32bit integer into binary again? Edited September 4, 2008 by pixartist Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now