(password, salt, iterations, data_key)
| 234 | |
| 235 | |
| 236 | def 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 | |
| 245 | def create_auth_verifier(password, salt, iterations): # type: (str, bytes, int) -> bytes |
nothing calls this directly
no outgoing calls
no test coverage detected