This turns out to be remarkably easy.
Tested 2014-10-21 on Lubuntu 14.04.1 LTS, updated recently.
\sudo \dd bs=1M count=64 if=/dev/urandom of=swapfile.crypt loop=$( \losetup --find ) \losetup ${loop} swapfile.crypt \cryptsetup open --type plain --key-file /dev/urandom ${loop} swapfile \mkswap /dev/mapper/swapfile \swapon /dev/mapper/swapfile
As of this date, the Btrfs FAQ says that encrypted swap files are not safe on that file system.
I did not explore any further, for such things as setting it to enable on every boot. The safest thing is to not use either a swap file or swap partition.