diff --git a/functions.sh b/functions.sh index 538e520..19f4282 100644 --- a/functions.sh +++ b/functions.sh @@ -13,13 +13,21 @@ shaStatic(){ shaWithNum(){ #hashes date with SHA - echo - echo "$1 character password generated using SHA256 with date" - echo "***************************************************" - date +%s | sha256sum | base64 | head -c $1 ; echo - echo "***************************************************" + if [ $1 -ge 255 ];then + echo + echo "Error : $0 : Please choose a number lower than 255" + echo + + else + echo + echo "$1 character password generated using SHA256 with date" + echo "***************************************************" + date +%s | sha256sum | base64 | head -c $1 ; echo + echo "***************************************************" + fi } + leftHand(){ echo echo "8 character password easy to type with left hand" @@ -29,9 +37,16 @@ leftHand(){ } leftHandNum(){ - echo - echo "$1 character password easy to type with left hand" - echo "**************************************************" -