Search Results

Showing results 1 to 16 of 16
Search took 0.01 seconds.
Search: Posts Made By: adamj2
Forum: C++ Aug 3rd, 2008
Replies: 10
Views: 1,388
Posted By adamj2
Just made a quick experiemental change and if I create an integer variable and give it the value of 0x0b

and then do:

memset(key, integer, 20);

it works.

So maybe I should be trying to...
Forum: C++ Aug 3rd, 2008
Replies: 10
Views: 1,388
Posted By adamj2
So in case#2 do you mean that the contents of my file should be:

\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b\x0b ?

I have done that and it treats each '\',...
Forum: C++ Aug 3rd, 2008
Replies: 10
Views: 1,388
Posted By adamj2
I have a file called mackeystring.dat and its contents is exactly:
0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b

NB: the key, as exactly given by the test vector that I am using, using hmac-sha from...
Forum: C++ Aug 3rd, 2008
Replies: 10
Views: 1,388
Posted By adamj2
Thanks,

I have now got it reading ok from the file into the array of unsigned chars.

The only problem is that it is interpreting the key different than it should be.

The content of my file...
Forum: C++ Aug 3rd, 2008
Replies: 10
Views: 1,388
Posted By adamj2
Many thanks for the reply, I will just read the whole key in one go now so have changed the .dat file to read 0x0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b0b for the 20 byte key.

Where should I use the...
Forum: C++ Aug 2nd, 2008
Replies: 10
Views: 1,388
Posted By adamj2
Hi there,

I want to read 1 byte of information, in the form of an array of unsigned chars [1], from a file. I then want to use this piece of data to act as a secret key for a message...
Forum: C++ Jul 4th, 2008
Replies: 4
Views: 1,746
Posted By adamj2
OK, cool, thanks for that.

If I wanted to do the same sort of thing with strings but then convert it using c_str() is there a way to add to the c_str() function to do this or would I have to...
Forum: C++ Jul 4th, 2008
Replies: 4
Views: 1,746
Posted By adamj2
Hi there,

Say I have a payload:

1) unsigned char apayload[] = {'H','i',' ','T','h','e','r','e'};

And then I have another payload, which is the same as above but with an additional 2...
Forum: C++ Jul 1st, 2008
Replies: 19
Views: 2,341
Posted By adamj2
Hi again!

I am now at the stage with adapting my code with the code used in this system in the labs.

In the labs the payload is a string of unsigned chars so I don't think it likes the...
Forum: C++ Jun 21st, 2008
Replies: 19
Views: 2,341
Posted By adamj2
Yeah that command does work after all, did not realise that.

I don't know anything about endian etc so I probably should look into that as some of my code will be eventually imported onto a...
Forum: C++ Jun 21st, 2008
Replies: 19
Views: 2,341
Posted By adamj2
Is it possible to somehow use this line to obtain the sequence number:

int g = *(reinterpret_cast<int*>(&sequence));

I put the above after defining:
#
sequence[0] = 8;
#
sequence[1] = 0;
#
Forum: C++ Jun 21st, 2008
Replies: 19
Views: 2,341
Posted By adamj2
Yes that does work! Thanks so much for that, that is exactly what I was trying to do!

I have changed the code slightly to start adapting it for my use (see below). I have set the sequence number...
Forum: C++ Jun 20th, 2008
Replies: 19
Views: 2,341
Posted By adamj2
Thanks for responces, will check out that link in a bit.

Sorry for not making my questions clear.

I now know it is a string of chars that I want to append my 4 byte sequence number to.

I...
Forum: C++ Jun 20th, 2008
Replies: 19
Views: 2,341
Posted By adamj2
I have been given some code for an new packet header processing. And all the data is appended to the payload as one long string. I am trying to add a seq num bit to it and just testing it out in a...
Forum: C++ Jun 20th, 2008
Replies: 19
Views: 2,341
Posted By adamj2
Hi, thanks for the reply,

Yeah I think I am probably trying to extract from a string of unsigned chars.

Basically all the data from the packets, such as payload, header length's etc are...
Forum: C++ Jun 19th, 2008
Replies: 19
Views: 2,341
Posted By adamj2
Hi there,

What I am trying to do is implement my own sequence number program.

I have a sequence number i.e 0001 and then I try to convert this to a binary string in byte format of 4 bytes: 00...
Showing results 1 to 16 of 16

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC