Search Results

Showing results 1 to 9 of 9
Search took 0.01 seconds.
Search: Posts Made By: neilcoffey
Forum: Java May 9th, 2009
Replies: 8
Views: 2,263
Posted By neilcoffey
Yes, the key HAS to be of a certain length. In this case, you're asking for 128-bit encryption, so your key as to be (128/8) = 16 bytes long.

Normally, an encryption key is essentially "random"...
Forum: Java May 9th, 2009
Replies: 8
Views: 2,263
Posted By neilcoffey
The key is simple a sequence of 16 random bytes created by the KeyGenerator. It's actually the same 16 bytes as returned by getEncoded() -- your raw[] array in this case.

If you want to use some...
Forum: Java May 4th, 2009
Replies: 1
Views: 279
Posted By neilcoffey
OK, so the basic idea is that you can use sine and cosine to convert from an angle to a position on the screen. If r is the radius, then the (x) and (y) coordinates are r * Math.sin(angle) and r *...
Forum: Java Apr 7th, 2009
Replies: 17
Views: 1,186
Posted By neilcoffey
As people have mentioned, you need to use asymmetric encryption at the very start of the conversation to send the sessiion key to the server. Use RSA for this. Essentially, you create a...
Forum: Computer Science Dec 29th, 2008
Replies: 3
Views: 1,131
Posted By neilcoffey
For more effective programming, don't try and memorise this list; bracket expressions appropriately so that any programmer can read them whether or not they have also memorised this list (practically...
Forum: Java Dec 29th, 2008
Replies: 8
Solved: Conversion
Views: 652
Posted By neilcoffey
You don't actually have to go to all that trouble, though...


int val = Integer.parseInt(str, 2);
float f = Float.intBitsToFloat(val);
Forum: Java Dec 14th, 2008
Replies: 7
Views: 566
Posted By neilcoffey
There's nothing wrong with it per se -- it's a very powerful component -- but it's not designed for what you're trying to do. It is designed for cases where you want to run code in some arbitrary...
Forum: Java Dec 11th, 2008
Replies: 5
Views: 449
Posted By neilcoffey
OK, so in this specific example, absolutely any sequence of bytes can be a valid string. So when you read a string from the file-- I assume you're thinking of one "string" per line, so you'd...
Forum: Java Dec 11th, 2008
Replies: 4
Views: 802
Posted By neilcoffey
In linear probing, you do indeed just try the next space and so on. If you use linear probing (or indeed any type of probing to resolve collisions) then you have to think about strategies to avoid...
Showing results 1 to 9 of 9

 


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

©2003 - 2009 DaniWeb® LLC