make register_cipher_adapter private and fix cryptorref release