2016-09-04 19 views

答えて

11

PythonのBase64は:

import base64 

encoded = base64.b64encode('Hello World!') 
print encoded 

# value of encoded is SGVsbG8gV29ybGQh 

のJavascriptのbtoa

var str = "Hello World!"; 
var enc = window.btoa(str); 

var res = enc; 

// value of res is SGVsbG8gV29ybGQh 

あなたは、どちらも同じ結果を生成見ることができるように。

関連する問題