Fundamental difference between Hashing and Encryption algorithms

I see a lot of confusion between hashes and encryption algorithms and I would like to hear some more expert advice about: When to use hashes vs encryptions What makes a hash or encryption algorithm different (from a theoretical/mathematical level) i.e. what makes hashes irreversible (without aid of a rainbow tree) Here are some similar … Read more

How can bcrypt have built-in salts?

Coda Hale’s article “How To Safely Store a Password” claims that: bcrypt has salts built-in to prevent rainbow table attacks. He cites this paper, which says that in OpenBSD’s implementation of bcrypt: OpenBSD generates the 128-bit bcrypt salt from an arcfour (arc4random(3)) key stream, seeded with random data the kernel collects from device timings. I … Read more

Secure hash and salt for PHP passwords

It is currently said that MD5 is partially unsafe. Taking this into consideration, I’d like to know which mechanism to use for password protection. This question, Is “double hashing” a password less secure than just hashing it once? suggests that hashing multiple times may be a good idea, whereas How to implement password protection for … Read more

NullPointerExcetion Native Method Accessor… Hashing Words Issue

This whileloop is strange: while (scanner.hasNextLine()) { String line = scanner.nextLine(); while (line != null) { String word = scanner.next(); addWord(word, linecount); } linecount++; } If your input file is: Then scanner.nextLine() would be return a, then scanner.next() would return b, because nextLine returns the next end-line delimited String, and next returns the next token … Read more