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

Function create_encryption_params

keepercommander/utils.py:236–242  ·  view source on GitHub ↗
(password, salt, iterations, data_key)

Source from the content-addressed store, hash-verified

234
235
236def create_encryption_params(password, salt, iterations, data_key): # type: (str, bytes, int, bytes) -> bytes
237
238 key = crypto.derive_key_v1(password, salt, iterations)
239 enc_iter = int.to_bytes(iterations, length=3, byteorder='big', signed=False)
240 enc_iv = crypto.get_random_bytes(16)
241 enc_data_key = crypto.encrypt_aes_v1(data_key * 2, key, iv=enc_iv, use_padding=False)
242 return b'\x01' + enc_iter + salt + enc_data_key
243
244
245def create_auth_verifier(password, salt, iterations): # type: (str, bytes, int) -> bytes

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected