Check for openssl in crypt tool
This commit is contained in:
parent
2f635326dd
commit
26889fc6cc
12
crypt/crypt
12
crypt/crypt
|
@ -3,6 +3,16 @@
|
|||
|
||||
currentVersion="1.6.0"
|
||||
|
||||
|
||||
checkOpenSSL()
|
||||
{
|
||||
if ! command -v openssl &>/dev/null ;then
|
||||
echo "Error: to use this tool openssl must be installed" >&2
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
## uses openssl aes 256 cbc encryption to encrypt file salting it with password designated by user
|
||||
encrypt()
|
||||
{
|
||||
|
@ -70,6 +80,8 @@ usage()
|
|||
echo " -v Get the tool version"
|
||||
}
|
||||
|
||||
checkOpenSSL || exit 1
|
||||
|
||||
while getopts "huve:d:" opt; do ## alows for using options in bash
|
||||
case $opt in
|
||||
e) ## when trying to encrypt run this
|
||||
|
|
Loading…
Reference in New Issue