Skip to content
Bruce Wayne edited this page Jul 21, 2021 · 1 revision

From Hex

string str = "7EE4B8ADE69687E6B58BE8AF953132EFBC81";
// ReadOnlySpan<char> str = "7EE4B8ADE69687E6B58BE8AF953132EFBC81";
Span<byte> b = str.FromHex();

To Hex

ReadOnlySpan<byte> b = Encoding.UTF8.GetBytes(@"114514");
// Span<byte> b = Encoding.UTF8.GetBytes(@"114514");
string str = b.ToHex(); // lowercase
string str = b.ToHexString(); // uppercase

Data format extensions

KDF

Symmetric crypto

Clone this wiki locally