Added useful functions into aes lib