Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate same cypher for any length string #9

Open
1 task done
junejosheeraz opened this issue Nov 21, 2019 · 0 comments
Open
1 task done

Generate same cypher for any length string #9

junejosheeraz opened this issue Nov 21, 2019 · 0 comments

Comments

@junejosheeraz
Copy link

Prerequisites

Description

I have successfully used the library to Encrypt and Decrypt values. See below;

Raw Value=1234567890123456, Encrypted=5959499404198841, Decrypted=1234567890123456
Raw Value=MNEMONIC, Encrypted= XXZI9ob, Decrypted=MNEMONIC
Raw Value=SOMEVALU, Encrypted=TC6WQj21, Decrypted=SOMEVALU
Raw Value=SOM, Encrypted=qVI, Decrypted=SOM
Raw Value=SOME, Encrypted=mJry, Decrypted=SOME
Raw Value=SOMEV, Encrypted=j4b4f, Decrypted=SOMEV

As you can see my requirement is that user would be storing the encrypted values in thier database and they would want to search on these encrypted values using LIKE '%' but this won't work because it generates different value depending on the length of the string. Is there anyway I can restrict the library to generate the value to be as follows;

Raw Value=SOMEVALU, Encrypted=TC6WQj21, Decrypted=SOMEVALU
Raw Value=SOM, Encrypted=TC6, Decrypted=SOM
Raw Value=SOME, Encrypted=TC6W, Decrypted=SOME
Raw Value=SOMEV, Encrypted=TC6WQ, Decrypted=SOMEV

Or am I missing the whole point?

Versions

1.0.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant