Web Design and Web Development Forum

  1. #1
    jay's Avatar
    • jay is offline
    • A Toddler - Don't be Fooled!
    Join Date
    Nov 2005
    Location
    India
    Posts
    20
    Rep Power
    0
  2. jay is on a distinguished road
  3. blowfish encryption

    Hi,
    Iam trying to code the blowfish encryption algorithim & I need some help with that. hmm...trying to figure it out since a day but havent found a solution.....
    So let me get to the prob directly --> In the initializion phase of the algorithim , after the p-array is declared & initialized with the fractional part of pi , it is supposed to be XORed with the Key( the key is input by the user) .
    Well........my prob starts here. the array P contains hex-numbers & the array key is a string .how can i XOR these ??Isnt XOR meant for binary stuff!!
    Any help or suggestion is "highly" appreciated .....thnks. please refer: http://en.wikipedia.org/wiki/Blowfish_(cipher)
    Reply With Quote Reply With Quote
  4. #2
    Join Date
    Sep 2005
    Location
    Perth, Western Australia
    Posts
    417
    Rep Power
    7
  5. _jameshales is on a distinguished road
  6. Re: blowfish encryption

    Hex-numbers are typically just another way to write down binary data because it's easier to read that way. String characters are represented by binary data, therefore can easily be converted to hex. They're all just numbers. I'm not a Java person, so I don't know how, but it should not be a problem if you go looking around for it. If need be, you could use a lookup table, but there must be a more attractive solution.

    _jameshales
    Last edited by _jameshales; 12-04-2005 at 12:12 AM.
    Death to the non-believers!
    Reply With Quote Reply With Quote
  7. #3
    4fingers's Avatar
    Join Date
    Aug 2005
    Location
    UK, Scotland
    Age
    25
    Posts
    850
    Rep Power
    7
  8. 4fingers is on a distinguished road
  9. Re: blowfish encryption

    That more attractive solution could be as simple as this:
    Code:
    String MYTEXT = "My encryption Text";
    //Convert the String into Bytes
    MYTEXT.getBytes("UTF-8");
    If that doesn’t help at all try posting your code here so we can have a better understanding of problem and maybe be able to give more detailed answers :)

    The four finger rule: There is no middle finger.
    Reply With Quote Reply With Quote

Similar Threads

  1. Encryption Safety & Collisions
    By Mau in forum PHP Articles
    Replies: 13
    Last Post: 03-09-2006, 11:33 AM
  2. Encryption software
    By g3gamer in forum Computer Corner
    Replies: 2
    Last Post: 08-09-2005, 09:28 PM
  3. RSA encryption decyprtion program
    By justdoit in forum C and C++ Programming
    Replies: 3
    Last Post: 05-24-2005, 12:47 PM
  4. Blowfish Algorithm
    By omanofmysteryp in forum Chit Chat and Hangout
    Replies: 2
    Last Post: 11-14-2004, 12:39 PM