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

Method decrypt

examples/dbcrypt/DbCrypt.cpp:169–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

167}
168
169void DbCrypt::decrypt(CheckStatusWrapper* status, unsigned int length, const void* from, void* to)
170{
171 status->init();
172
173 if (!key)
174 {
175 noKeyError(status);
176 return;
177 }
178
179 const ISC_UCHAR* f = static_cast<const ISC_UCHAR*>(from);
180 ISC_UCHAR* t = static_cast<ISC_UCHAR*>(to);
181
182 while (length--)
183 {
184 *t++ = (*f++) ^ key;
185 }
186}
187
188void DbCrypt::setKey(CheckStatusWrapper* status, unsigned int length, IKeyHolderPlugin** sources,
189 const char* keyName)

Callers

nothing calls this directly

Calls 1

initMethod · 0.45

Tested by

no test coverage detected