Some rough notes.
Untested. Copied from http://rayslinux.blogspot.com/2011/01/encrypting-swap-file-in-linux.html
Remove your swap entry from /etc/fstab
(fstab) and reboot.
\apt-get install cryptsetup libpam-mount \swapoff /dev/sdX \dd bs=1M if=/dev/urandom of=/dev/sdX
\gedit /etc/crypttab
append:
\cryptoswap /dev/sdX /dev/urandom cipher=aes-cbc-essiv:sha256,size=256,hash=sha256,swap
\gedit /etc/fstab
append:
/dev/mapper/cryptoswap none swap sw 0 0
Reboot and then issue
\cryptsetup status cryptoswap
Last updated 2019-12-06 at 12:37:04