diff options
| author | JP Dillingham <jp@dillingham.me> | 2022-10-17 08:59:57 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-17 08:59:57 -0500 |
| commit | 352def9012790ab97252715697291ba4c0ebec01 (patch) | |
| tree | 0b8d6e2340ce40818ddbbea2de0db4019b5e45a3 /src/slskd/Common/CommonExtensions.cs | |
| parent | 593308d4e786cd569e3a683f5b02b8f13aa39b23 (diff) | |
| parent | 9379a1fa3af07bab44b81752fe808cb9ca94be7a (diff) | |
| download | slskd-352def9012790ab97252715697291ba4c0ebec01.tar.gz | |
Merge pull request #697 from slskd/agent
Add the ability to 'network' multiple copies of slskd together (enable remote shares)
Diffstat (limited to 'src/slskd/Common/CommonExtensions.cs')
| -rw-r--r-- | src/slskd/Common/CommonExtensions.cs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/src/slskd/Common/CommonExtensions.cs b/src/slskd/Common/CommonExtensions.cs index 8fb1fd25..561162d4 100644 --- a/src/slskd/Common/CommonExtensions.cs +++ b/src/slskd/Common/CommonExtensions.cs @@ -325,27 +325,6 @@ namespace slskd } /// <summary> - /// Converts the byte array into a base 62 encoded string. - /// </summary> - /// <param name="bytes">The bytes to convert.</param> - /// <returns>The converted bytes as a base 62 string.</returns> - public static string ToBase62String(this byte[] bytes) - { - const string alphabet = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"; - - BigInteger dividend = new BigInteger(bytes); - var builder = new StringBuilder(); - - while (dividend != 0) - { - dividend = BigInteger.DivRem(dividend, alphabet.Length, out BigInteger remainder); - builder.Insert(0, alphabet[Math.Abs((int)remainder)]); - } - - return builder.ToString(); - } - - /// <summary> /// Determines whether the given object is a <see cref="Dictionary{TKey, TValue}"/>. /// </summary> /// <param name="obj">The object to check.</param> |
