Branch Coverage

src/encoding.c
Criterion Covered Total %
branch 60 110 54.5


line true false branch
127 20 0 if (dst_len <= olen) {
133 400 20 while (src_len-- > 0) {
136 520 400 while (acc_len >= 6) {
141 20 0 if (acc_len > 0) {
174 486 18 if (d == 0xFF) {
180 126 360 if (acc_len >= 8) {
182 360 0 if ((len++) >= *dst_len) {
195 18 0 if (acc_len > 4 || (acc & (((unsigned)1 << acc_len) - 1)) != 0) {
18 0 if (acc_len > 4 || (acc & (((unsigned)1 << acc_len) - 1)) != 0) {
218 80 36 if (c < '0' || c > '9') {
222 80 0 if (acc > (ULONG_MAX / 10)) {
226 80 0 if ((unsigned long)c > (ULONG_MAX - acc)) {
231 36 0 if (str == orig || (*orig == '0' && str != (orig + 1))) {
0 36 if (str == orig || (*orig == '0' && str != (orig + 1))) {
0 0 if (str == orig || (*orig == '0' && str != (orig + 1))) {
322 9 0 if (!type_string) {
326 9 0 CC("$");
327 9 0 CC(type_string);
331 9 0 CC_opt("$v=", DECIMAL_U32(ctx->version));
9 0 CC_opt("$v=", DECIMAL_U32(ctx->version));
0 9 CC_opt("$v=", DECIMAL_U32(ctx->version));
333 9 0 CC("$m=");
334 9 0 DECIMAL_U32(ctx->m_cost);
0 9 DECIMAL_U32(ctx->m_cost);
335 9 0 CC(",t=");
336 9 0 DECIMAL_U32(ctx->t_cost);
0 9 DECIMAL_U32(ctx->t_cost);
337 9 0 CC(",p=");
338 9 0 DECIMAL_U32(ctx->lanes);
0 9 DECIMAL_U32(ctx->lanes);
341 9 0 CC("$");
342 9 0 BIN(ctx->salt, maxsaltlen, ctx->saltlen);
0 9 BIN(ctx->salt, maxsaltlen, ctx->saltlen);
343 9 0 CC("$");
344 9 0 BIN(ctx->out, maxoutlen, ctx->outlen);
0 9 BIN(ctx->out, maxoutlen, ctx->outlen);
357 9 0 if (validation_result != ARGON2_OK) {
362 0 9 if (*str == 0) {
406 10 0 if (!type_string) {
410 10 0 if (validation_result != ARGON2_OK) {
415 10 0 SS("$");
416 10 0 SS(type_string);
418 10 0 SS("$v=");
419 0 10 SX(ctx->version);
421 10 0 SS("$m=");
422 0 10 SX(ctx->m_cost);
423 10 0 SS(",t=");
424 0 10 SX(ctx->t_cost);
425 10 0 SS(",p=");
426 0 10 SX(ctx->lanes);
428 10 0 SS("$");
429 10 0 SB(ctx->salt, ctx->saltlen);
431 10 0 SS("$");
432 10 0 SB(ctx->out, ctx->outlen);
457 49 40 while (num >= 10) {