@@ -38,13 +38,35 @@ var TestVectors = map[string]*testVector{
3838 Good : []string {"/ip4/1.2.3.4/udp/1234/quic" , "/ip6/::/udp/1234/quic" },
3939 Bad : []string {"/ip4/0.0.0.0/tcp/12345/quic" , "/ip6/1.2.3.4/ip4/0.0.0.0/udp/1234/quic" , "/quic" },
4040 },
41+ "SAM3" : {
42+ Pattern : SAM3 ,
43+ Good : []string {"/ip4/1.2.3.4/udp/1234/sam3/3|3|6|6|2|2" , "/ip6/::1/tcp/1234/sam3/3|3|6|6|2|2" },
44+ Bad : []string {"/ip4/0.0.0.0/udp/1234/quic/sam3/3|3|6|6|2|2" , "/sam3/3|3|6|6|2|2" },
45+ },
46+ "GARLIC" : {
47+ Pattern : GARLIC ,
48+ Good : []string {
49+ "/garlic32/6zlio2ipbnmir26nrspdbt4cqnhu52ekw2gw6kfca4p77tdtsmja" ,
50+ "/garlic64/Z1XdSy9zNg1IaFfDqWhpzoSjlf-lAWT4YkrRkq3rsnQyY69QXc~-2Xeyoj7~36swjrHjlH-OqvTbM0jFAc2RzIQ1VEf9uDUAz1sso9~or1xIDxsEUmgK~TQvHMPNFwVGhMxZ7K4LkLbi~sN2WlZB49FhhWVgD-nV-WfuRi~aByMUGtM1SqBML-Ok1bI6Pw9o6VIM-aFG7RLj1s8RsJOCzkugKLMsW-k5gXze6QJlRJKlcHI23bf-LPqhTfVe2HpEjS5DAj1fohtY63V3Kksd34Ejh86I-njBYGG66enBHvM-sRKAUQIKAt7eJEuk7l5BcidGD4HqodRl1nYBrHoP0MFDtw4ZTLcefVCwZ~OttpnUdH~9RBPBxc9Da-mVOe9dh608anxuXTBaKzdN6FQjxnMPEMQe5pBPzjGrkUpgCJLduybMltVymlYIMR98dPpBskqJQjuEm5tHBSWJfiKD9POVKIV0yyjlakoHm4Y~Zrl14GdFTIf2BGHMjf9GP0Q5BQAEAAcAAA==" ,
51+ },
52+ Bad : []string {
53+ "/ip4/0.0.0.0/tcp/12345/garlic32/6zlio2ipbnmir26nrspd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