add llSHA256String() same as osSHA256

This commit is contained in:
UbitUmarov
2022-10-22 14:10:07 +01:00
parent 0d35531200
commit a28c875ce4
5 changed files with 20 additions and 3 deletions

View File

@@ -1230,12 +1230,12 @@ namespace OpenSim.Framework
return (char)(b > 9 ? b + 0x37 : b + '0');
}
public static string bytesToHexString(byte[] bytes, bool lowerCaps)
public static string bytesToHexString(Span<byte> bytes, bool lowerCaps)
{
if (bytes == null || bytes.Length == 0)
return string.Empty;
char[] chars = new char[2 * bytes.Length];
Span<char> chars = stackalloc char[2 * bytes.Length];
if (lowerCaps)
{
for (int i = 0, j = 0; i < bytes.Length; ++i)