Implement in-memory keystore.