MCPcopy Create free account
hub / github.com/apache/arrow / SecureMove

Function SecureMove

cpp/src/arrow/util/secure_string.cc:64–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62
63namespace {
64void SecureMove(std::string& string, std::string& dst) {
65 auto ptr = string.data();
66 dst = std::move(string);
67
68 // We require the buffer address string.data() to remain (not be freed) as is,
69 // or to be reused by dst. Otherwise, we cannot securely clear string after std::move
70 ARROW_CHECK(string.data() == ptr || dst.data() == ptr);
71}
72} // namespace
73
74void SecureString::SecureClear(std::string* secret) {

Callers 2

SecureStringMethod · 0.85
secure_string.ccFile · 0.85

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected