You can look at a sample at: http://wiki.tuxonice.net/EncryptedSwapAndRoot
It uses suspend2 but can easily be converted to swsusp... All you have to do is modify f_suspend2_resume behavior. If you do, please send me a patch.
Well... I've updated the code. Now it supports wswsusp.
Enjoy. Alon.
- Linux-crypto: cryptography in and on the Linux system Archive: http://mail.nl.linux.org/linux-crypto/