MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / encrypt

Method encrypt

examples/dbcrypt/DbCrypt.cpp:150–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148}
149
150void DbCrypt::encrypt(CheckStatusWrapper* status, unsigned int length, const void* from, void* to)
151{
152 status->init();
153
154 if (!key)
155 {
156 noKeyError(status);
157 return;
158 }
159
160 const ISC_UCHAR* f = static_cast<const ISC_UCHAR*>(from);
161 ISC_UCHAR* t = static_cast<ISC_UCHAR*>(to);
162
163 while (length--)
164 {
165 *t++ = (*f++) ^ key;
166 }
167}
168
169void DbCrypt::decrypt(CheckStatusWrapper* status, unsigned int length, const void* from, void* to)
170{

Callers

nothing calls this directly

Calls 1

initMethod · 0.45

Tested by

no test coverage detected