Encrypt Sample using GPG (preferred method)

# Download & import the pub key
wget https://malwareanalysis.dev/ma_pub.txt && gpg --import ma_pub.txt && rm ma_pub.txt

# Encrypt the sample
gpg --encrypt -r admin@malwareanalysis.dev sample

Encrypt Sample using 7z

➜  7z a -p -mhe -t7z output.7z file.txt

7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21
p7zip Version 16.02 (locale=utf8,Utf16=on,HugeFiles=on,64 bits,8 CPUs x64)

Scanning the drive:
1 file, 22 bytes (1 KiB)

Creating archive: output.7z

Items to compress: 1


Enter password (will not be echoed):
Verify password (will not be echoed) :

Files read from disk: 1
Archive size: 222 bytes (1 KiB)
Everything is Ok