Advertisement
sergio_educacionit

salt.sh

Nov 16th, 2023
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. read -p "Ingrese contraseña: " contrasena
  4.  
  5. echo "Contraseña sin cifrar: $contrasena"
  6.  
  7.  
  8. salt=$RANDOM
  9.  
  10. contrasena_cifrada=$(echo ${contrasena}${salt} | md5sum)
  11.  
  12.  
  13. echo "Sal añadida: $salt"
  14. echo "Contraseña cifrada: $contrasena_cifrada"
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement