简体   繁体   中英

Java AES 128 with 256 character key size

Is it possible to encrypt a file in Java with AES algorithm of Block size 128 bits and key size 256 characters(bytes) ?

As per references the key size can be of maximum 256 bits or 32 characters.

I have a requirement to do with 256 characters, is it possible ?

AES has one block size of 128-bits and three key sizes of 128, 192 & 256 bits.

If you have a 256 characters, characters depending on the encoding can be more than 1 byte, you can use a key derivation method such as PBKDF2 (Password Based Key Derivation Function 2) to derive a key from the characters.

See the comment to the question.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM