ruby on rails - SHA1 Encryption? -


I have the database with the following fields: id, q_id, text, session .. and I already have 2 records I want to encrypt each line (because every line is unique - id, session, course text ..) ..

@w = digest :: SHA1.hexdigest ( Id + q_id <+ Code +> instead it makes one. If that still is what you want to do, then my guess is that id and q_id are fixed and in string There is a need to convert.

  @ wa = digest :: SHA 1. HexDogest (Answer: id.at_s + anacid.tts_s + anonymoustext + integration)   

I also like to use the string because it makes it very clear that we are working with a string

  @w = digest :: SHA1 .hexdigest ("# {id} # {q_id} # {text} # {session}}")    

Comments

Popular posts from this blog

qt - switch/case statement in C++ with a QString type -

python - sqlite3.OperationalError: near "REFERENCES": syntax error - foreign key creating -

Python's equivalent for Ruby's define_method? -