public void FromBase64Url() { Assert.AreEqual(1, EncodingUtils.FromBase64Url("AQIDBA==")[0]); Assert.AreEqual(2, EncodingUtils.FromBase64Url("AQIDBA==")[1]); Assert.AreEqual(3, EncodingUtils.FromBase64Url("AQIDBA==")[2]); Assert.AreEqual(4, EncodingUtils.FromBase64Url("AQIDBA==")[3]); Assert.AreEqual(1, EncodingUtils.FromBase64Url("AQIDBAUG")[0]); Assert.AreEqual(2, EncodingUtils.FromBase64Url("AQIDBAUG")[1]); Assert.AreEqual(3, EncodingUtils.FromBase64Url("AQIDBAUG")[2]); Assert.AreEqual(4, EncodingUtils.FromBase64Url("AQIDBAUG")[3]); Assert.AreEqual(5, EncodingUtils.FromBase64Url("AQIDBAUG")[4]); Assert.AreEqual(6, EncodingUtils.FromBase64Url("AQIDBAUG")[5]); }
public void ToBase64Url_UnderscoreReplacesSlash() { Assert.AreEqual(255, EncodingUtils.FromBase64Url("_w==")[0]); }
public void FromBase64Url_Dashes() { Assert.AreEqual(250, EncodingUtils.FromBase64Url("-g==")[0]); }