Adds pubkey export to example
Adds encrypt to example

Fixes encrypt() backend return