Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7678575
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T17:40:45+00:00 2026-05-31T17:40:45+00:00

I would like to encrypt a string ( user’s email ) and always obtain

  • 0

I would like to encrypt a string ( user’s email ) and always obtain the same resulting string
I am saving the user’s email as login user name, because I have searches on that field ( for example, user’s email already exists when registering. Or select user’s password where email = ‘abc’ )

For password encryption and decryption I use Jasypt which does the job.

String encryption, I can encrypt and decrypt but I haven’t found a way to have the decryption constant.

I have searched a lot for the solution but none seem to address my problem. It is possible I am not using the right keywords, I am not familiar with encryption.

I don’t have to use Jasypt for the string encryption. anything that transforms “hello@hello.com” into “@ABC#EFG” every time would be great.

I have also tried scrambling the bytes of the string using different scrambling algorithms according to length of string, first letter etc. Unfortunately, it stops working when I save the encrypted string in MySQL. From what I understand, every byte which ends up having a Unicode value that MySQL doesn’t like is not saved correctly ( it works fine when I use a string present in the test class, but not when I actually save encrypted String and retrieve from DB )

Any ideas – links to solution?

Thanks very much in advance, Dan

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T17:40:46+00:00Added an answer on May 31, 2026 at 5:40 pm

    Just have a look at any hash methods. MD5, SHA-1, SHA-256 can be obtained using MessageDigest. Just get the bytes of your original strings (using getBytes("UTF-8")), and you should have always the same result.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to encrypt strings which could potentially only be about three or
I would like to test a string containing a path to a file for
I would like to know if I could encrypt two or more strings in
I'd like to AES-128 encrypt a string in Delphi with a password. I'd like
Hey. I would like to save sensitive user data to my apps sandbox but
I want to encrypt an arbitrary-length string with a password in Python. I would
I am using Oracle 9 and JDBC and would like to encyrpt a clob
Would like to get a list of advantages and disadvantages of using Stored Procedures.
Would like to create a strong password in C++. Any suggestions? I assume it
Would like to be able to set colors of headings and such, different font

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.