public void OneByteTest() { var challenge = new Challenge1(); var hexText = "49"; var bytes = Util.HexToBytes(hexText); var base64Text = challenge.BytesToBase64(bytes); var expectedBase64Text = "SQ=="; base64Text.ShouldBe(expectedBase64Text); }
public void WebsiteTest() { var challenge = new Challenge1(); var hexText = "49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d"; var bytes = Util.HexToBytes(hexText); var base64Text = challenge.BytesToBase64(bytes); var expectedBase64Text = "SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t"; expectedBase64Text.ShouldBe(base64Text); }