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

  • SEARCH
  • Home
  • 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 7458267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T13:25:32+00:00 2026-05-29T13:25:32+00:00

My encryption and decryption is running good without using a file. But I have

  • 0

My encryption and decryption is running good without using a file. But I have to store the encrypted data in a file and transfer it to a peer system, where I have to read the file and decrypt it.
The problem I face is, a single unicode on encryption gives me a set of unicodes(thats my cipher) like this.

                                  ☺ ╪iß 

When I store these cipher in a file, the decryption will be done for each of the unicodes separately. But the decrption should be done for the respective set of unicodes to get back my plaintext. How should I store them in a file? How could I select the corresponding unicodes on decryption to get back my plaintext? I’m using the keys of size 1024 bits.

  • 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-29T13:25:33+00:00Added an answer on May 29, 2026 at 1:25 pm

    Encryption algorithms don’t work on unicode characters. They work on binary data: byte arrays.

    If you need to encrypt unicode text (a String, for example), then choose a non lossy byte encoding for the String (like UTF-8, for example), transform the String to a byte array (String.getBytes("UTF-8")), encrypt the byte array, and write the resulting byte array to the file.

    When decrypting, read the file as a byte array, decrypt this byte array (which gives another byte array), and recreate a String from this byte array using the same character encoding: new String(plainTextBytes, "UTF-8").

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

Sidebar

Related Questions

I have a legacy C++ module that offers encryption/decryption using the openssl library (DES
What is the best way to encrypt a value in INI file? Using Encryption/Decryption
I have a function that need RSA encryption/decryption. With provided .pem file, that contains
Ok, I have tried to create my own encryption/decryption methods using PHP mcrypt ,
One of the tools I am using uses encryption/decryption to send out data over
I've written Encryption/Decryption methods using the RC2CryptoServiceProvider in C# and for some reason, I
I am using RijndaelManaged to make a simple encryption/decryption utility. This is working fine,
Given two classes: First class performs AES encryption / decryption and returns encrypted /
I'm using application level encryption to protect sensitive data. I need to encrypt the
I am running a java string encryption/decryption class that i got from the internet!

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.