Very useful video, Thank you! If I have a Task Entity in my project with about 60 fields and there is already a lot of data in the database. If I implement the attribute converter at this stage for 10 fields - How do I deal with the old data in the database?
is there a way to run select query in postgres with the encryption key and get the decrypted data? or is there a way to apply encryption/ decryption at the database level in postgres so that whenever anything is getting stored it is stored in the encrypted form
Generally you can use AES_DECRYPT method of mysql which accepts two parameters- first is the column name and second is the encryption key. But usually it doesn't work when you use the attribute converter. So in production level applications, either we don't directly query the data or if we really want to query something, then encrypt only the sensitive data which does not need to be queried.
Native queries does not work directly with atribute converter. You can either use JPQL, or first encrypt the value that you need to pass as argument in native query, and then use it. I'll make sure to add a separate video on this topic to properly explain this.
Part 2: Spring Boot + AES | Part 2 | Query using JPA Methods, JPQL and Native Queries
ruclips.net/video/ofz_Invk6aU/видео.html
Thank your for the valuable informative video. 👍👍👍
I love this so much. Thank you.
Very useful information
Very useful video, Thank you!
If I have a Task Entity in my project with about 60 fields and there is already a lot of data in the database. If I implement the attribute converter at this stage for 10 fields - How do I deal with the old data in the database?
is there a way to run select query in postgres with the encryption key and get the decrypted data?
or is there a way to apply encryption/ decryption at the database level in postgres so that whenever anything is getting stored it is stored in the encrypted form
Suppose if we have to send the encrypted value to another party then how will they decrypt it??
how can execute query in mysql and see the original data
Generally you can use AES_DECRYPT method of mysql which accepts two parameters- first is the column name and second is the encryption key. But usually it doesn't work when you use the attribute converter. So in production level applications, either we don't directly query the data or if we really want to query something, then encrypt only the sensitive data which does not need to be queried.
Cipher not initialized; nested exception is java.lang.IllegalStateException: Cipher not initialized
could you please do video for microsoft sql server server
For Mssql also, the steps should be the same, just change your driver from mysql to mssql. Try it on your own, and comment down if you face any error.
Can you help me with how to handle native query in JPARepo ?
If you have encrypted coloumn
Native queries does not work directly with atribute converter. You can either use JPQL, or first encrypt the value that you need to pass as argument in native query, and then use it.
I'll make sure to add a separate video on this topic to properly explain this.
@@vks-tech Yes please do needful