天天看點

java getBytes() | python bytearray()

最近在處理密鑰相關的項目,需要将java代碼轉換為python,其中java有個函數是getBytes(),需要轉換成python的函數,經查找資料發現python用的是bytearray().

java python 代碼分别如下:

java  : Passwd.getBytes()

python : bytearray(passwd)