kaveh1000 wrote: ↑Wed Dec 12, 2018 10:49 am
...to return an encrypted password through a Stack...
Code: Select all
/bin/sh: line 1: md5sum: command not found.
Do you need encryption or hashing? For a password hashing is (almost always) best, but I want to make sure I understand the usage before drawing conclusions.
Do you need to use the OS shell command for the hash?
If you can use LC's built-in functions, three are available: md5digest, sha1digest, and messageDigest.
The first two are legacy, while messageDigest supports both md5 and sha1 as specifiable algos.
More importantly, messageDigest also supports more modern and secure algos. Currently these include sha2 and sha3, which should ideally be used for modern password hashing, as there are known collisions with both md5 and sha1.
Salting is also considered good practice, but we can get to that once we have a better understanding of what you're looking to do.