mirror of
https://git.v0l.io/Kieran/void.cat.git
synced 2025-04-01 01:18:01 +02:00
Strip extension
This commit is contained in:
parent
92bc1d7e95
commit
8f912ec075
@ -44,6 +44,7 @@ public static class Extensions
|
||||
public static Guid FromBase58Guid(this string base58)
|
||||
{
|
||||
var enc = new NBitcoin.DataEncoders.Base58Encoder();
|
||||
base58 = Path.GetFileNameWithoutExtension(base58);
|
||||
var guidBytes = enc.DecodeData(base58);
|
||||
if (guidBytes.Length != 16) throw new VoidInvalidIdException(base58);
|
||||
return new Guid(guidBytes);
|
||||
|
Loading…
x
Reference in New Issue
Block a user