Pat Farrell wrote:
James Sabre wrote:So by that token your correction to my key should be correct but it isn't . DES keys should have odd parity so your corrected key bytes should have been
Yet your correction is still wrong, since DES ignores the lowest order bit. Your "7" is the same as my "6" and your "1" is the same as "0".
Details matter. Stop being an a**
Pat Farrell wrote:
James Sabre wrote:Sorry Pat but that 'nit' is irrelevant in the context of this thread and is just a distraction.
Huh? Why this response?
Too many folks try to write crypto code from examples they pull from books or websites. They don't understand what they are doing, and don't understand any of the subtleties. Yet as this thread shows, its all about subtleties. So good example code should be correct. If you had used AES, the keys you used were OK, but they were wrong for DES. If you are claiming to be an expert, and complaining about irrelevant comments, then I think that your example code should actually be correct.
sai srinivas jonnalagadda wrote:no james.
because this logic is needed at many places where DB operations are not there.
I found one solution.
divide the input number by some big number (assumed to be maximum value of int) and then concat both quotient and reminder which is definitely be a unique number.
sai srinivas jonnalagadda wrote:
problem is i am doing some database operations with those numbers. the maximum limit for that column is 2power32 -1.. i cannot change the data type for that column
so, I must convert them uniquely into int sized values, so that i can insert them in tables.
I want a algorithm kind of thing which generates random unique number based on the digits of the input number.
sai srinivas jonnalagadda wrote:that is right. but I need a good approach of generating unique numbers.
i don't want to increment values from 0 blindly.
Raymond Tong wrote:
If you want to replace ALL without regular expression, try with \Q..\E sequence.
Pat Farrell wrote:
One nit on James' excellent explaination.
Trevor Basden wrote:Here is the code I am using to initialize the Cipher. I'm unsure which mode of encryption is the default.
Here are 3 encrypted... 32 bytes, 16 of which are the same each timeHex values. Original Strings are 16 characters long:
Hunter McMillen wrote:The OP doesn't want to exit the loop, they want to catch the exception inside so they can continue iterating through the rest of the data.
Hunter
ram bandakunta wrote:I searched for a solution where there was an exception thrown in a while loop or for loop,in this case i was using an iterator. when the exception is thrown in this case due to an invalid stat the loop could not continue with the processing the other valid stats, all i had to do was to put a try catch inside the for loop .......
ram bandakunta wrote:Hi I wanted post the solution for the isuue i faced ,I do not have any question.
varun nurav wrote:
please help !!