line |
true |
false |
branch |
17
|
0 |
1769 |
if (id == -1) croak("FATAL: find_hash failed for '%s'", hash_name); |
19
|
0 |
1769 |
if (!SvPOK(key)) croak("FATAL: key must be string/buffer scalar"); |
20
|
1769 |
0 |
k = (unsigned char *) SvPVbyte(key, k_len); |
23
|
0 |
1769 |
if (!RETVAL) croak("FATAL: Newz failed"); |
26
|
0 |
1769 |
if (rv != CRYPT_OK) { |
43
|
0 |
0 |
if (!RETVAL) croak("FATAL: Newz failed"); |
56
|
1781 |
1773 |
for(i = 1; i < items; i++) { |
57
|
1773 |
8 |
in_data = (unsigned char *)SvPVbyte(ST(i), in_data_len); |
58
|
1760 |
21 |
if (in_data_len > 0) { |
60
|
0 |
1760 |
if (rv != CRYPT_OK) croak("FATAL: hmac_process failed: %s", error_to_string(rv)); |
63
|
0 |
1773 |
XPUSHs(ST(0)); /* return self */ |
81
|
0 |
1769 |
if (rv != CRYPT_OK) croak("FATAL: hmac_done failed: %s", error_to_string(rv)); |
83
|
1 |
1768 |
if (ix == 3) { |
85
|
0 |
1 |
if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv)); |
88
|
1 |
1767 |
else if (ix == 2) { |
90
|
0 |
1 |
if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv)); |
93
|
14 |
1753 |
else if (ix == 1) { |
95
|
0 |
14 |
if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv)); |
115
|
88 |
0 |
unsigned char *k = (unsigned char *)SvPVbyte(key, klen); |
123
|
0 |
88 |
if (id == -1) croak("FATAL: find_digest failed for '%s'", hash_name); |
125
|
0 |
88 |
if (rv != CRYPT_OK) croak("FATAL: hmac_init failed: %s", error_to_string(rv)); |
126
|
96 |
88 |
for (i = 2; i < items; i++) { |
127
|
80 |
16 |
in = (unsigned char *)SvPVbyte(ST(i), inlen); |
128
|
80 |
16 |
if (inlen > 0) { |
130
|
0 |
80 |
if (rv != CRYPT_OK) croak("FATAL: hmac_process failed: %s", error_to_string(rv)); |
134
|
0 |
88 |
if (rv != CRYPT_OK) croak("FATAL: hmac_done failed: %s", error_to_string(rv)); |
137
|
13 |
75 |
if (ix == 3) { |
139
|
0 |
13 |
if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv)); |
142
|
13 |
62 |
else if (ix == 2) { |
144
|
0 |
13 |
if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv)); |
147
|
49 |
13 |
else if (ix == 1) { |
149
|
0 |
49 |
if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv)); |