I have a Java based web application where encryption is required for most of the fields in MySQL database. I went all over the web, stackoverflow and videos and found the below.
- In most posts I went through, the encryption returned
binary
data - To support the binary data returned by the encryption, the database fields has to be changed, for an example changing
varchar
intovarbinary
I really have no much knowledge on cryptography (I just started learning) and this lead me to believe encryption always need to be done in binary
. Then I was looking for an easy to use library, and came across Jasypt. Interestingly, I noticed in Jasypt the String
will be encrypted as a String
and so on where I do not have to go and change the database heavily.
Now I have few questions to ask.
1. How Jasypt
is encrypting String
as String
while other methods I have seen returning binary? Same goes to numbers (it encrypt BigInteger and BigDecimal but no conversion to binary)
Does
Jasypt
is using standard encryption methods?What is the best encryption algorithm we can use with Jasypt for text and then numbers?
I know Jasypt is having a
password encryption
but passwords should behash+salt
. Byencryption
did they mean this for passwords?Jasypt last publish date is 25 Feb 2014. I hope this is not old, because these encryption methods etc are mathematics algorithms which do not change much?