Forum Stats

  • 3,839,340 Users
  • 2,262,485 Discussions
  • 7,900,937 Comments

Discussions

Byte[] Size of PBEWITHSHA256AND256BITAES-CBC-BC

f93d9005-1ca9-4585-9200-13737f6116dd
edited Oct 17, 2014 7:03PM in Cryptography

Hi,

In my program I am encrypting sensitive data using PBEWITHSHA256AND256BITAES-CBC-BC with a 16bit Salt.

I collect the encrypted data in a variable of type byte[].

My question:

I need to store the encrypted data in MySQL, in a VARBINARY(of size x). How do I know what the min. and max. size will be of ANY collected byte[]?

I'd like to size the VARBINARY Column appropriately as in VARBINARY(4096) thus knowing the min/max size would help, assuming the byte[] size is not the same for an encrypted clear text.

Thank you for your thoughts.

- Kenneth

This discussion has been closed.