0

There is byte array: { 0, 0, 0, 0, 52, 246, 141, 6 }

It somehow represented as a string: AAAAADT4RyQ=

How to do it? What is the encoder?

FireShock
  • 1,082
  • 1
  • 15
  • 25

1 Answers1

8

Looks like base64 encoding to me:

string base64 = Convert.ToBase64String(data);

That doesn't give quite the results you're expecting though - it gives AAAAADT2jQY=.

The base64 string you've given corresponds to { 0, 0, 0, 0, 52, 248, 71, 36 } - without more information about where this data is coming from, or how you got the expected value, it's impossible to explain the discrepancy.

Jon Skeet
  • 1,421,763
  • 867
  • 9,128
  • 9,194