Skip to content

Instantly share code, notes, and snippets.

@zetashift
Created March 28, 2018 19:58
Show Gist options
  • Select an option

  • Save zetashift/fbc78367e2402147d3b15cf4cc58639f to your computer and use it in GitHub Desktop.

Select an option

Save zetashift/fbc78367e2402147d3b15cf4cc58639f to your computer and use it in GitHub Desktop.
Cryptopals set 1 ch 1
import base64, strutils
let
input = """49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d"""
expected = "SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t"
assert expected == encode(parseHexStr(strIn))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment