MCPcopy Index your code
hub / github.com/apache/caldera / read

Function read

app/utility/file_decryptor.py:37–42  ·  view source on GitHub ↗
(filename, encryptor)

Source from the content-addressed store, hash-verified

35
36
37def read(filename, encryptor):
38 with open(filename, 'rb') as f:
39 buf = f.read()
40 if buf.startswith(bytes(FILE_ENCRYPTION_FLAG, encoding='utf-8')):
41 buf = encryptor.decrypt(buf[len(FILE_ENCRYPTION_FLAG):])
42 return buf
43
44
45def decrypt(filename, configuration, output_file=None, b64decode=False):

Callers 1

decryptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected