-
Notifications
You must be signed in to change notification settings - Fork 176
Closed
Description
Please consider the example below. The only thing I've done was to remove the last letter ('U') from the separators used by default. After removing just this one letter, the decoding function will fail to decode the string and generates an empty array instead.
long[] input = new long[] { 1021432904621883393 };
Hashids target = new Hashids(seps: "cfhistCFHIST"); // default is "cfhistuCFHISTU"
// Encode
string hashid = target.EncodeLong(input); // hashid will be set to "uXGMvwPWDRuwv"
// Decode
long[] decoded = target.DecodeLong(hashid); // decoded will be set to an empty long[]
Assert.Equal(input, decoded); // fails
Metadata
Metadata
Assignees
Labels
No labels