Crypto++ Convert Integer to Unsigned Char

Dwight Kulkarni <[email protected]> Fri, 21 Apr 2023 16:39:11 -0700 (PDT)
Newsgroups gmane.comp.encryption.cryptopp
Message-ID <[email protected]>
Hi everyone,

I need to convert Integer to unsigned char array or to vector<unsigned char>

If I do this:
for(int i=0; i<c.ByteCount(); i++){
  cout << int(c.GetByte(i)) << " ";
}

The values are not what I expect. Also, is there anything faster than a for 
loop to get the data out ?

I have verified I have the correct integer, but when I access the values in 
this way, they are incorrect.

-- 
You received this message because you are subscribed to the Google Groups "Crypto++ Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/cryptopp-users/c0f8e502-f976-4c14-adf3-3556a41eca93n%40googlegroups.com.