I’ve implemented an authentication scheme that is basically Recipe #31
from the Rails Recipes book. I’m using the SHA 256 digest to generate
the hash that is stored in the database.
Are there any characters, which, if they were present in the submitted
password form field, would cause the digest to fail?
Basically, do I need to escape any of the characters that might be
submitted for the password from the user?
I’ve implemented an authentication scheme that is basically Recipe #31
from the Rails Recipes book. I’m using the SHA 256 digest to generate
the hash that is stored in the database.
Are there any characters, which, if they were present in the submitted
password form field, would cause the digest to fail?
Basically, do I need to escape any of the characters that might be
submitted for the password from the user?
count = 0
digests.each do |s|
if s.length != ‘c6e20991c4a5ea747fdd7a9e3ce5210504a74e75’.length
puts “Not the right length for #{s}”
else
count += 1
end
end