void issue_14_it_should_decode_encode_hex_correctly() { var hashids = new HashIds("this is my salt"); var encoded = hashids.EncodeHex("DEADBEEF"); encoded.Should().Be("kRNrpKlJ"); var decoded = hashids.DecodeHex(encoded); decoded.Should().Be("DEADBEEF"); var encoded2 = hashids.EncodeHex("1234567890ABCDEF"); var decoded2 = hashids.DecodeHex(encoded2); decoded2.Should().Be("1234567890ABCDEF"); }
void it_decode_an_encoded_number() { _hashIds.DecodeHex("lzY").Should().Be("FA"); _hashIds.DecodeHex("eBMrb").Should().Be("FF1A"); _hashIds.DecodeHex("D9NPE").Should().Be("12ABC"); }