ruby - how to encrypt text -
I need to encrypt a string (from the text field) which will later be decrypted when displayed.
I do not have to worry that it is quite safe, but not just to store data in plain text format.
How to do it easily on someone in the train?
If you are not concerned about security, then you can only base 64 Can change:
encoded = base64 :: encode (string) is decoded = base 64 :: decode (encoded)
anyway Binary data is also suitable for encoding.
This is not really encrypting because any developer can be estimated that its base is 64 encoded data.
Comments
Post a Comment