c++ - How can i convert a string into a ZZ number? -


I am using the ElGamal encryption / decryption algorithm to apply. I got the thing that it is working but the algorithm wants to convert the message to an integer, so it can be encrypted.
So if I work like a number 1234 works fine, but how can I enable a C ++ string (STD :: string) to convert it into a ZZ number and then add that ZZ number Change from to a string?

LE :

ZZ This is a class that represents a large number. Ex: 18287348238476283658234881728315674273671623781254124517353

So basically I'm looking for "Hello World" for example and for running four of four and getting the ASSI Code of the letters, I will get a number: 72 101 108 108 111 32 87 111 114 108 100 "
And then I have to change this number to" Hello World "string

Or maybe a better way.

An easy way to do this is:

  std:: String str ("1234567890"); NTL :: Zed Number (NTL :: INIT_VAL, str.c_str ());  

Now note that:

  std :: cout & lt; & Lt; Str & lt; & Lt; Std :: endl; // print 1234567890 std :: cout & lt; & Lt; Number & lt; & Lt; Std :: endl; // print 1234567890  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -