Вопрос

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?

Это было полезно?

Решение

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.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top