Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converting base16 FromBase Incorrect #2

Open
kotval opened this issue Jan 19, 2019 · 0 comments
Open

Converting base16 FromBase Incorrect #2

kotval opened this issue Jan 19, 2019 · 0 comments

Comments

@kotval
Copy link

kotval commented Jan 19, 2019

Code to Reproduce:

string hexString = "49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d";
Base16Encoder b16Encoder = new Base16Encoder();
byte[] data = b16Encoder.FromBase(hexString.ToUpper());
foreach(byte b in data) {Console.Write(b + " ");}


Output: Output From Code in Base 10:
16 144 135 24 208 128 24 177 137 24 193 140 24 145 142 24 112 128 28 145 143 28 81 194 8 1 130 28 33 129 24 145 142 8 1 140 24 145 139 24 80 128 24 16 128 28 1 143 24 145 195 24 241 142 24 241 197 28 48 128 24 209 197 28 49 136 28 33 143 24 241 141 
Correct Output in Decimal:
73 39 109 32 107 105 108 108 105 110 103 32 121 111 117 114 32 98 114 97 105 110 32 108 105 107 101 32 97 32 112 111 105 115 111 110 111 117 115 32 109 117 115 104 114 111 111 109```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant