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

Method keyCallback

examples/dbcrypt/CryptKeyHolder.cpp:258–292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256}
257
258int CryptKeyHolder::keyCallback(CheckStatusWrapper* status, ICryptKeyCallback* callback)
259{
260 if (key != 0)
261 return 1;
262
263 IConfigEntry* confEntry = getEntry(status, "Auto");
264
265 if (confEntry)
266 {
267 FB_BOOLEAN b = confEntry->getBoolValue();
268 confEntry->release();
269
270 if (b)
271 {
272 confEntry = getEntry(status, "Key");
273 if (confEntry)
274 {
275 key = confEntry->getIntValue();
276 confEntry->release();
277 }
278 else
279 key = 0x5a;
280
281 return 1;
282 }
283 }
284
285 if (callback && callback->callback(0, NULL, 1, &key) != 1)
286 {
287 key = 0;
288 return 0;
289 }
290
291 return 1;
292}
293
294ICryptKeyCallback* CryptKeyHolder::keyHandle(CheckStatusWrapper* status, const char* keyName)
295{

Callers

nothing calls this directly

Calls 4

getBoolValueMethod · 0.45
releaseMethod · 0.45
getIntValueMethod · 0.45
callbackMethod · 0.45

Tested by

no test coverage detected