MCPcopy Create free account
hub / github.com/Keeper-Security/Commander / get_record_data_json_bytes

Function get_record_data_json_bytes

keepercommander/api.py:132–138  ·  view source on GitHub ↗

Get serialized and utf-8 encoded record data with padding

(data)

Source from the content-addressed store, hash-verified

130
131
132def get_record_data_json_bytes(data): # type: (dict) -> bytes
133 """Get serialized and utf-8 encoded record data with padding"""
134 data_str = json.dumps(data)
135 padding = int(math.ceil(max(384, len(data_str)) / 16) * 16)
136 if padding:
137 data_str = data_str.ljust(padding)
138 return data_str.encode('utf-8')
139
140
141def pad_aes_gcm(json):

Callers

nothing calls this directly

Calls 1

encodeMethod · 0.45

Tested by

no test coverage detected