Refactoring AES for safe rust interface.