More improvements to the cryptography API.