简体   繁体   中英

how to search encrypted data in grails

I have domain with 3 field cardNo, cardName and account

class card {
    String cardNo
    String cardName
    Account account

static constraints = {
    cardNo(blank:false, unique:true)
    cardName(blank:false)
    account(blank:false)
}

The cardNo must be encrypted when saved, I used encryptionUtil Java to encrypt it. On my list screen, I want to make search fiture, which can be search by cardNo and cardName. Is it possibe if I search data encrypted with create cretiria in grails?? If can't use create criteria, what is the best way to search encrypted data?? Need your help. thanks before :)

I can give you an advice: avoid store card numbers in your database. Use payment services for it.

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