Skip to content

Commit

Permalink
Merge pull request #372 from iAGorynT/iAGorynT-Code-Snippet-Changes
Browse files Browse the repository at this point in the history
Increased Iterations to 1000000
  • Loading branch information
iAGorynT authored Sep 5, 2024
2 parents 8fc7e0c + 539a044 commit c108a02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ShellScripts/Cryptxt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if [ $action = 'enc' ]
then
echo "ENCODE: $string"
# Encrypt the string using OpenSSL, copy to clipboard, and display
echo $string | openssl enc -base64 -e -aes-256-cbc -salt -pass pass:$password -pbkdf2 -iter 600000 | tr -d '\n' | pbcopy
echo $string | openssl enc -base64 -e -aes-256-cbc -salt -pass pass:$password -pbkdf2 -iter 1000000 | tr -d '\n' | pbcopy
echo
pbpaste
echo
Expand All @@ -47,7 +47,7 @@ elif [ $action = 'dec' ]
echo "DECODE: $string"
echo
# Decrypt the string using OpenSSL and display
echo $string | openssl enc -base64 -d -aes-256-cbc -salt -pass pass:$password -pbkdf2 -iter 600000
echo $string | openssl enc -base64 -d -aes-256-cbc -salt -pass pass:$password -pbkdf2 -iter 1000000
fi

# Print a newline for better formatting
Expand Down
4 changes: 2 additions & 2 deletions ShellScripts/Crypvault.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ while true; do
# Encrypt
if [ $action = 'enc' ]; then
# Create tar archive, compress with gzip, and encrypt with OpenSSL
tar -cf $vaultdir.tar $vaultdir && gzip $vaultdir.tar && openssl enc -base64 -e -aes-256-cbc -salt -pass pass:$hash_cfg -pbkdf2 -iter 600000 -in $vaultdir.tar.gz -out $vaultenc && rm -f $vaultdir.tar.gz
tar -cf $vaultdir.tar $vaultdir && gzip $vaultdir.tar && openssl enc -base64 -e -aes-256-cbc -salt -pass pass:$hash_cfg -pbkdf2 -iter 1000000 -in $vaultdir.tar.gz -out $vaultenc && rm -f $vaultdir.tar.gz
# Move encrypted file to iCloud and vault directory to trash
mv -f $vaultenc $iclouddir
rm -rf ~/.trash/$vaultdir
Expand All @@ -180,7 +180,7 @@ while true; do
# Decrypt
elif [ $action = 'dec' ] || [ $action = 'view' ]; then
# Decrypt with OpenSSL, decompress, and extract
openssl enc -base64 -d -aes-256-cbc -salt -pass pass:$hash_cfg -pbkdf2 -iter 600000 -in $vaultenc -out $vaultdir.tar.gz && tar -xzf $vaultdir.tar.gz && rm -f $vaultdir.tar.gz
openssl enc -base64 -d -aes-256-cbc -salt -pass pass:$hash_cfg -pbkdf2 -iter 1000000 -in $vaultenc -out $vaultdir.tar.gz && tar -xzf $vaultdir.tar.gz && rm -f $vaultdir.tar.gz
# Move encrypted file to trash
rm -rf ~/.trash/$vaultenc
mv -f $vaultenc ~/.trash
Expand Down

0 comments on commit c108a02

Please sign in to comment.