Refactor into clear_ciphers; RT3588