25 lines
567 B
C#
Raw Permalink Normal View History

namespace LogosStorageClient
2024-07-26 09:14:46 +02:00
{
public static class LogosStorageUtils
2024-07-26 09:14:46 +02:00
{
public static string ToShortId(string id)
{
if (id.Length > 10)
{
return $"{id[..3]}*{id[^6..]}";
}
return id;
}
// after update of codex-dht, shortID should be consistent!
public static string ToNodeIdShortId(string id)
{
if (id.Length > 10)
{
return $"{id[..2]}*{id[^6..]}";
}
return id;
}
2024-07-26 09:14:46 +02:00
}
}