| 1464 | |
| 1465 | |
| 1466 | void makeHash(DataTypeUtilBase* dataTypeUtil, const SysFunction* function, dsc* result, |
| 1467 | int argsCount, const dsc** args) |
| 1468 | { |
| 1469 | fb_assert(argsCount >= function->minArgCount); |
| 1470 | |
| 1471 | if (argsCount == 1) |
| 1472 | makeInt64Result(dataTypeUtil, function, result, argsCount, args); |
| 1473 | else if (argsCount >= 2) |
| 1474 | { |
| 1475 | bool cryptHash; |
| 1476 | const HashAlgorithmDescriptor* d = getHashAlgorithmDesc(JRD_get_thread_data(), function, args[1], &cryptHash); |
| 1477 | |
| 1478 | if (cryptHash) |
| 1479 | result->makeVarying(d->length, ttype_binary); |
| 1480 | else |
| 1481 | { |
| 1482 | switch(d->length) |
| 1483 | { |
| 1484 | case 4: |
| 1485 | result->makeLong(0); |
| 1486 | break; |
| 1487 | default: |
| 1488 | fb_assert(false); |
| 1489 | } |
| 1490 | } |
| 1491 | result->setNullable(args[0]->isNullable()); |
| 1492 | } |
| 1493 | } |
| 1494 | |
| 1495 | |
| 1496 | unsigned decodeLen(unsigned len) |
nothing calls this directly
no test coverage detected