주소

http://cryptopals.com/sets/1/challenges/1/

문제

Convert hex to base64

The string:

49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d

Should produce:

SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t

So go ahead and make that happen. You'll need to use this code for the rest of the exercises.

코드

파이썬 2.7

1
2
string = "49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d"
print string.decode('hex').encode('base64')

해석

문제의 의도를 모르겠는데 그냥 hex를 base64로 바꿔줍시다.
댓글

댓글을 달아 주세요

댓글 달기
접기