Implemented the crypto API.