===== SHA256 =====
SHA-256 is a cryptographic (one-way) **hash function**, so there is no direct
way to decode it. The entire purpose of a cryptographic hash function is that
you can't undo it.
Hashing is a one way function (well, a mapping). It's irreversible, you apply
the secure hash algorithm and you cannot get the original string back. The most
you can do is to generate what's called "a collision", that is, finding a
different string that provides the same hash. Cryptographically secure hash
algorithms are designed to prevent the occurrence of collisions. You can attack
a secure hash by the use of a rainbow table, which you can counteract by
applying a salt to the hash before storing it.
Encrypting is a proper (two way) function. It's reversible, you can decrypt the
mangled string to get original string if you have the key.
Puede servir para guardar una password encriptada en b.d.
echo clave |sha256sum
a4011bda24f2f35c835acd50acafba77329b373df71d716a1a5c2f067e6a8e35 -