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 8926025
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T07:51:47+00:00 2026-06-15T07:51:47+00:00

In my project, I am encrypting some data (string) using the 3DES encryption algorithm.

  • 0

In my project, I am encrypting some data (string) using the 3DES encryption algorithm. The string I pass to the encryption function returns me a NSData object.

Now I want to convert NSData to NSString, so that I can send that string to server.

So I used this code to convert NSData to NSString

NSString *stringCreated = [[NSString alloc] initWithData:encryptedData encoding:NSASCIIStringEncoding];

But when I print this string, It prints very few characters on the console. I think there are few characters which is making a sequence of “\0” due to which it prints the string upto that character only.

I tried to encode the data with NSUTF8StringEncoding but it returns me (null).

I want to send the complete string to the server, what to do now?

  • 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-06-15T07:51:48+00:00Added an answer on June 15, 2026 at 7:51 am

    This will not work since encrypted string is binary data. Convert it to Base64, if you need to use textual representation.

    Here is described convertion of NSData to NSString : Converting NSData to base64

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

Sidebar

Related Questions

The following project is done in C++ with WinAPI, for encryption/encoding I am using
I am encrypting a text string using the following block of code. This code
I am doing some research for a future project and it requires some data
I'm using NSData+Base64 opensrc library found on githubt for a project that is due
I am working on a basic encryption program for a school project, and I
Recently, I have to convert an java project related to rsa/des encryption into an
I'm using encryption in my program, that decrypts files if it needs to use
Ok, so I need some advice on which encryption method I should use for
I am working on a project that involves sending some very small encrypted messages
I have a small open source project and I am about to add some

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.