Skip to content

Commit

Permalink
Merge branch 'main' of github.com:8ff/chap
Browse files Browse the repository at this point in the history
  • Loading branch information
chiefMarlin committed Sep 27, 2024
2 parents 8144f8b + 407a4b2 commit 08c1fe4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion testValidity.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ dd if=/dev/urandom of=randomData bs=1M count=1000 2>/dev/null || fail "Failed to
CKEY=test go run chap.go e < randomData > encryptedData || fail "Failed to encrypt data"
CKEY=test go run chap.go d < encryptedData > decryptedData || fail "Failed to decrypt data"

# Test pipe to make sure no decryption errors occur
dd if=/dev/urandom bs=1M count=1000 | CKEY=test go run chap.go e | CKEY=test go run chap.go d > /dev/null


# Check if on macOS, use md5 instead of md5sum
if [ "$(uname)" == "Darwin" ]; then
ORIGINAL_MD5=$(md5 -q randomData)
Expand All @@ -24,4 +28,4 @@ fi

rm randomData encryptedData decryptedData || fail "Failed to clean up"

echo "All tests passed successfully!"
echo "All tests passed successfully!"

0 comments on commit 08c1fe4

Please sign in to comment.