MCPcopy Create free account
hub / github.com/AGWA/git-crypt / process_stream

Method process_stream

crypto.cpp:70–80  ·  view source on GitHub ↗

Encrypt/decrypt an entire input stream, writing to the given output stream

Source from the content-addressed store, hash-verified

68
69// Encrypt/decrypt an entire input stream, writing to the given output stream
70void Aes_ctr_encryptor::process_stream (std::istream& in, std::ostream& out, const unsigned char* key, const unsigned char* nonce)
71{
72 Aes_ctr_encryptor aes(key, nonce);
73
74 unsigned char buffer[1024];
75 while (in) {
76 in.read(reinterpret_cast<char*>(buffer), sizeof(buffer));
77 aes.process(buffer, buffer, in.gcount());
78 out.write(reinterpret_cast<char*>(buffer), in.gcount());
79 }
80}
81

Callers

nothing calls this directly

Calls 1

processMethod · 0.80

Tested by

no test coverage detected