Kordor Pyrbot

Greenhorn
+ Follow
since Dec 15, 2013
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Kordor Pyrbot

Is that related to the chunk of code you posted earlier? If so you're going to have to explain how the code is relevant. I couldn't figure out how the original question was relevant to that code -- for example I didn't see anything which looked like an encrypted message there. And now you're asking about inserting text, presumably into the byte array which that code fills? That requires explanation too.



Thank you for the response.I've posted the code earlier.That was just to insert the wav file to a byte array.Let's analyze the code again.

this code is executed when my 'Encode' button on my GUI is clicked.I've extracted the audio data and it's stored in the audioBytes array.The text will be extracted from a text file chosen by the user or from a TextArea where the user may enter the text manually.Then the text will be encrypted using DES algorithm.The variable that holds this text is named 'enctext'.
Now,how do I append this text to the wave file bits contained in the audioBytes array?Do I have to convert the encrypted text 'enctext' to bits or to bytes?Kindly help me with the code to accomplished this.
10 years ago
Hey Ulf can you help me with the insertion of text into a wave file datachunk?
10 years ago
Hey there helper.Down below is how my encoding code is.now how do I exactly append the encrypted message into the audioBytes array?kindly help.
10 years ago

Stephen Longville wrote:thanks for the reply greg:

if slightly changed the code since my last post, i now write as soon as each byte is ready, as for your advice, unless im mistaken i belive i'v already done this

within my gui i type the size of the file to be extracted (and how many(for now just one)) just to make sure its working but i still get gibberish when i extract anything past 32 characters (or bytes).

e.g. encoding the text file with: "This is my secret message" (25 bytes) works as its short, but iv been trying it with a script of hamlet i found somwhere in .txt format (201789 bytes)

to avoid any confution heres my encoding / decoding up to date:



encoder writes new WAVE header info, then begins to loop through the file data taking each byte converting it to bits and changes it aquordingly




also heres how i convert to and from bits to bytes:





I'm not quite sure what's happening in line number 39 & 40.please help & what packages is the coder using?

10 years ago
I'm actually tryin' to read the dataChunk into the audio data array but I don't exactly know how to go about it.
10 years ago
totalFileData = new byte[(int)v.elementAt(0).getFile().length()];

This is where the error actually happens.
10 years ago
Can you help me with the code?I'm not quite sure how to go about it.
10 years ago
So with what code do I substitute then?
10 years ago
It;s actually taken from [ the above code ].

cheers.

[ UD: removed duplicated code - see the code posted above ]
10 years ago
totalFileData = new byte[(int)v.elementAt(0).getFile().length()];

I'm getting an error here.
10 years ago
It's working! but the variable v is of what type?
10 years ago

Stephen Longville wrote:...



where is the getSubchunk() and getDataChunk located?
I cannot find one.
10 years ago