utils: a helper function to convert byte array into hex string
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
0c3dd305c6
commit
05a9c4d8f3
@ -65,3 +65,7 @@ def find_flagfile(default_path=RYU_DEFAULT_FLAG_FILE):
|
||||
|
||||
def round_up(x, y):
|
||||
return ((x + y - 1) / y) * y
|
||||
|
||||
|
||||
def hex_array(data):
|
||||
return ' '.join(hex(ord(chr)) for chr in data)
|
||||
|
Loading…
Reference in New Issue
Block a user