#!/bin/bash
# (C) David Vajda
# 2025-05-01
# Encryption - tests
# gpg
# ssh
# ssl
gpg --full-generate-key
gpg --list-keys | tail -n 4 | head -n 1 | sed 's/\([A-F][0-9]*\)/\1/g'
keyid=$(gpg --list-keys | tail -n 4 | head -n 1 | sed 's/\([A-F][0-9]*\)/\1/g')
gpg --export -a $keyid > crypt20250501.asc
echo "(C) David Vajda\n2025-05-01\nEcryption - tests - plain tests \nHello" > crypt20250501.unencrypted.txt
gpg --recipient "$keyid" --output crypt20250501.encrypted.txt.asc --encrypt -a crypt20250501.unencrypted.txt
gpg --decrypt --output crypt20250501.decrypted.txt crypt20250501.encrypted.txt.asc
l=$(ls crypt20250501.*)
for s in $l
do
echo "$s"
cat "$s"
done
ssh-keygen
ssh-copy
...
#openssl ..
|