I have a password key for an AES cipher, and I need to store it in an Oracle database column. The password is generated as a byte array in Java, and so I need to figure out the best way to convert it into a data type that Oracle understands and vice versa.
Share
Assuming that the byte array in Java has fewer than 4000 elements, you can store it in a
RAWcolumn in Oracle. This tells Oracle that the data is binary so it won’t ever attempt to do character set conversion. And it is the least amount of overhead (both in terms of storage and in terms of the complexity of working with the data).If the byte array can potentially have more than 4000 elements, you can store it in a
BLOBcolumn.