Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added explicit path to openssl calls #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions EncryptedStrings_Bash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
function GenerateEncryptedString() {
# Usage ~$ GenerateEncryptedString "String"
local STRING="${1}"
local SALT=$(openssl rand -hex 8)
local K=$(openssl rand -hex 12)
local ENCRYPTED=$(echo "${STRING}" | openssl enc -aes256 -md md5 -a -A -S "${SALT}" -k "${K}")
local SALT=$(/usr/bin/openssl rand -hex 8)
local K=$(/usr/bin/openssl rand -hex 12)
local ENCRYPTED=$(echo "${STRING}" | /usr/bin/openssl enc -aes256 -md md5 -a -A -S "${SALT}" -k "${K}")
echo "Encrypted String: ${ENCRYPTED}"
echo "Salt: ${SALT} | Passphrase: ${K}"
}
Expand All @@ -28,4 +28,4 @@ function DecryptString() {
local SALT=""
local K=""
echo "${1}" | /usr/bin/openssl enc -aes256 -md md5 -d -a -A -S "$SALT" -k "$K"
}
}