Trim the AES key to size (256 bits)

This is the same behaviour as ruby OpenSSL
Merge pull request #123 from cconstantin/trim-aes-key

Trim the AES key to size (256 bits)