(params, record)
| 70 | return sec_data |
| 71 | |
| 72 | def prep_security_data_update(params, record): # type: (KeeperParams, KeeperRecord) -> Optional[APIRequest_pb2.SecurityData] |
| 73 | sd = APIRequest_pb2.SecurityData() |
| 74 | try: |
| 75 | sd.uid = utils.base64_url_decode(record.record_uid) |
| 76 | data = prep_security_data(params, record) |
| 77 | except: |
| 78 | logging.error('Could not update security data for record') |
| 79 | return |
| 80 | if data: |
| 81 | sd.data = data |
| 82 | return sd |
| 83 | |
| 84 | def prep_score_data(record): |
| 85 | empty_score_data = crypto.encrypt_aes_v2(json.dumps(dict()).encode('utf8'), record.record_key) |
no test coverage detected