[CRYPTO] api: Use structs for cipher/compression