MCPcopy Create free account
hub / github.com/ByteCorum/DragonBurn / Crypt

Function Crypt

Crypto/Crypto.cpp:21–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

19}
20
21void Crypt(std::vector<uint8_t>& data, const std::vector<uint8_t>& key)
22{
23 if (key.empty())
24 {
25 std::cerr << "Error: Encryption key cannot be empty." << std::endl;
26 return;
27 }
28
29 for (size_t i = 0; i < data.size(); ++i)
30 data[i] ^= key[i % key.size()];
31}
32
33void Help()
34{

Callers 1

mainFunction · 0.85

Calls 2

emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected