Finish refactoring of cipher.h API.