def to_bytes(s):
if sys.version_info < (<NUM_LIT:3>,):<EOL><INDENT>return "<STR_LIT>".join(map(chr, s))<EOL><DEDENT>else:<EOL><INDENT>return bytes(s)<EOL><DEDENT>
PY2/PY3 compatible way to convert to something cryptography understands