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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:19:10+00:00 2026-05-16T18:19:10+00:00

I am learning about cryptographic algorithms and in the process am attempting to implement

  • 0

I am learning about cryptographic algorithms and in the process am attempting to implement some well known schemes. I understand the mathematical explanations behind RSA and El Gamal, but am currently unable to test my implementations of either. The underlying problem is that I cannot see the way to convert plain text into a manipulatable number.

For Example:

Message = "This is a message I want to encrypt";
int x = (int)Message;
Encrypt(x,key);

In my mind, it should be possible to cast a string to an integer, but doing so in a method similar to the above example doesn’t work. How can I turn a plain-text message into a numerical value (and later back into a plain-text value) for the purposes of encryption?

  • 1 1 Answer
  • 3 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-16T18:19:11+00:00Added an answer on May 16, 2026 at 6:19 pm

    There are usually two steps to converting a string to an integer. The first is to convert each character into a small integer and then convert the resulting sequence of small integers into a large integer. For example, in Java or C# you can easily convert the string into a byte array representing its UTF-8 encoding. Then, by treating the byte array as a base-256 integer, you can convert it to a large integer. Every BigInteger package that I am aware of has a constructor that will accept an array of bytes, as well as a method that will go the other way and take the BigInteger and return an array of bytes.

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

Sidebar

Related Questions

Learning about threading is fascinating no doubt and there are some really good resources
I'm learning about hash tables, trying to understand how they work. I'd like to
i am learning about the difference between abstract classes and interfaces, but theoretical explanations
In learning about Web Deploy I came across some netsh.exe commands that talk about
I'm just learning some stuff about cryptography and I made a cool program to
I remember first learning about vectors in the STL and after some time, I
I learning about some basic C functions and have encountered time(NULL) in some manuals.
I've just started learning about OpenGL/Glut and I'm facing some issues. I want to
I'm learning about unit testing, and I'm trying to understand where the pieces fit
Learning about notifyAll made me question something about notify: in a typical situation we

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.