hex to str, str to hex (python3)
(文字とは、実際はstrではなくbytes型)
16進数 -> 文字
code:python
Out37: '7365747b67616c66_a7d67616c665f74' In 39: former = output.split('_')0 In 40: latter = output.split('_')1 In 41: p64(int(former, 16)) In 42: p64(int(latter, 16)) 注)数字によっては、int関数に渡さないで、そのままp64に渡すだけで変換できることもあるが、そうでない場合はinvalid decimal literalみたいなエラーがでる。
文字 -> 16進数
code:python
Out15: 8315180360373726310 Out16: '0x7365747b67616c66'