Branch Coverage

inc/CryptX_AuthEnc_EAX.xs.inc
Criterion Covered Total %
branch 67 216 31.0


line true false branch
17 20 0 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
0 20 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
0 0 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
0 0 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
0 0 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
19 20 0 if (!SvPOK_spec(nonce)) croak("FATAL: nonce must be string/buffer scalar");
0 20 if (!SvPOK_spec(nonce)) croak("FATAL: nonce must be string/buffer scalar");
0 0 if (!SvPOK_spec(nonce)) croak("FATAL: nonce must be string/buffer scalar");
0 0 if (!SvPOK_spec(nonce)) croak("FATAL: nonce must be string/buffer scalar");
0 0 if (!SvPOK_spec(nonce)) croak("FATAL: nonce must be string/buffer scalar");
21 0 20 if (SvOK(adata)) { /* adata is optional param */
22 0 0 if (!SvPOK_spec(adata)) croak("FATAL: adata must be string/buffer scalar");
0 0 if (!SvPOK_spec(adata)) croak("FATAL: adata must be string/buffer scalar");
0 0 if (!SvPOK_spec(adata)) croak("FATAL: adata must be string/buffer scalar");
0 0 if (!SvPOK_spec(adata)) croak("FATAL: adata must be string/buffer scalar");
0 0 if (!SvPOK_spec(adata)) croak("FATAL: adata must be string/buffer scalar");
27 0 20 if (id == -1) croak("FATAL: find_cipher failed for '%s'", cipher_name);
30 0 20 if (!RETVAL) croak("FATAL: Newz failed");
33 0 20 if (rv != CRYPT_OK) {
45 21 0 if (self) {
54 0 1 if (!RETVAL) croak("FATAL: Newz failed");
67 1 11 if (self->finalized) croak("FATAL: AEAD object already finalized");
69 4 7 if (in_data_len == 0) {
78 0 7 if (rv != CRYPT_OK) {
95 0 29 if (self->finalized) croak("FATAL: AEAD object already finalized");
97 4 25 if (in_data_len == 0) {
106 0 25 if (rv != CRYPT_OK) {
123 1 11 if (self->finalized) croak("FATAL: AEAD object already finalized");
125 0 11 if (rv != CRYPT_OK) croak("FATAL: eax_done failed: %s", error_to_string(rv));
127 0 11 XPUSHs(sv_2mortal(newSVpvn((char*)tag, tag_len)));
141 0 10 if (self->finalized) croak("FATAL: AEAD object already finalized");
143 0 10 if (rv != CRYPT_OK) croak("FATAL: eax_done failed: %s", error_to_string(rv));
145 10 0 if (items == 1) {
146 0 10 XPUSHs(sv_2mortal(newSVpvn((char*)tag, tag_len)));
150 0 0 if (!SvPOK_spec(ST(1))) croak("FATAL: expected_tag must be string/buffer scalar");
0 0 if (!SvPOK_spec(ST(1))) croak("FATAL: expected_tag must be string/buffer scalar");
0 0 if (!SvPOK_spec(ST(1))) croak("FATAL: expected_tag must be string/buffer scalar");
0 0 if (!SvPOK_spec(ST(1))) croak("FATAL: expected_tag must be string/buffer scalar");
0 0 if (!SvPOK_spec(ST(1))) croak("FATAL: expected_tag must be string/buffer scalar");
152 0 0 if (expected_tag_len!=tag_len) {
153 0 0 XPUSHs(sv_2mortal(newSViv(0))); /* false */
155 0 0 else if (mem_neq(expected_tag, tag, tag_len)) {
156 0 0 XPUSHs(sv_2mortal(newSViv(0))); /* false */
159 0 0 XPUSHs(sv_2mortal(newSViv(1))); /* true */
171 0 24 if (self->finalized) croak("FATAL: AEAD object already finalized");
174 0 24 if (rv != CRYPT_OK) croak("FATAL: eax_addheader failed: %s", error_to_string(rv));
175 0 24 XPUSHs(ST(0)); /* return self */
189 10 0 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
0 10 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
0 0 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
0 0 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
0 0 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
191 10 0 if (!SvPOK_spec(nonce)) croak("FATAL: nonce must be string/buffer scalar");
0 10 if (!SvPOK_spec(nonce)) croak("FATAL: nonce must be string/buffer scalar");
0 0 if (!SvPOK_spec(nonce)) croak("FATAL: nonce must be string/buffer scalar");
0 0 if (!SvPOK_spec(nonce)) croak("FATAL: nonce must be string/buffer scalar");
0 0 if (!SvPOK_spec(nonce)) croak("FATAL: nonce must be string/buffer scalar");
193 10 0 if (!SvPOK_spec(plaintext)) croak("FATAL: plaintext must be string/buffer scalar");
0 10 if (!SvPOK_spec(plaintext)) croak("FATAL: plaintext must be string/buffer scalar");
0 0 if (!SvPOK_spec(plaintext)) croak("FATAL: plaintext must be string/buffer scalar");
0 0 if (!SvPOK_spec(plaintext)) croak("FATAL: plaintext must be string/buffer scalar");
0 0 if (!SvPOK_spec(plaintext)) croak("FATAL: plaintext must be string/buffer scalar");
195 10 0 if (header && SvOK(header)) {
10 0 if (header && SvOK(header)) {
196 10 0 if (!SvPOK_spec(header)) croak("FATAL: header must be string/buffer scalar");
0 10 if (!SvPOK_spec(header)) croak("FATAL: header must be string/buffer scalar");
0 0 if (!SvPOK_spec(header)) croak("FATAL: header must be string/buffer scalar");
0 0 if (!SvPOK_spec(header)) croak("FATAL: header must be string/buffer scalar");
0 0 if (!SvPOK_spec(header)) croak("FATAL: header must be string/buffer scalar");
202 0 10 if(id==-1) croak("FATAL: find_cipher failed for '%s'", cipher_name);
203 6 4 output = NEWSV(0, pt_len > 0 ? pt_len : 1); /* avoid zero! */
211 0 10 if (rv != CRYPT_OK) {
215 0 10 XPUSHs(sv_2mortal(output));
216 0 10 XPUSHs(sv_2mortal(newSVpvn((char*)tag, tag_len)));
230 14 0 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
0 14 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
0 0 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
0 0 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
0 0 if (!SvPOK_spec(key)) croak("FATAL: key must be string/buffer scalar");
232 14 0 if (!SvPOK_spec(nonce)) croak("FATAL: nonce must be string/buffer scalar");
0 14 if (!SvPOK_spec(nonce)) croak("FATAL: nonce must be string/buffer scalar");
0 0 if (!SvPOK_spec(nonce)) croak("FATAL: nonce must be string/buffer scalar");
0 0 if (!SvPOK_spec(nonce)) croak("FATAL: nonce must be string/buffer scalar");
0 0 if (!SvPOK_spec(nonce)) croak("FATAL: nonce must be string/buffer scalar");
234 14 0 if (!SvPOK_spec(ciphertext)) croak("FATAL: ciphertext must be string/buffer scalar");
0 14 if (!SvPOK_spec(ciphertext)) croak("FATAL: ciphertext must be string/buffer scalar");
0 0 if (!SvPOK_spec(ciphertext)) croak("FATAL: ciphertext must be string/buffer scalar");
0 0 if (!SvPOK_spec(ciphertext)) croak("FATAL: ciphertext must be string/buffer scalar");
0 0 if (!SvPOK_spec(ciphertext)) croak("FATAL: ciphertext must be string/buffer scalar");
236 14 0 if (!SvPOK_spec(tagsv)) croak("FATAL: tag must be string/buffer scalar");
0 14 if (!SvPOK_spec(tagsv)) croak("FATAL: tag must be string/buffer scalar");
0 0 if (!SvPOK_spec(tagsv)) croak("FATAL: tag must be string/buffer scalar");
0 0 if (!SvPOK_spec(tagsv)) croak("FATAL: tag must be string/buffer scalar");
0 0 if (!SvPOK_spec(tagsv)) croak("FATAL: tag must be string/buffer scalar");
238 14 0 if (header && SvOK(header)) {
14 0 if (header && SvOK(header)) {
239 14 0 if (!SvPOK_spec(header)) croak("FATAL: header must be string/buffer scalar");
0 14 if (!SvPOK_spec(header)) croak("FATAL: header must be string/buffer scalar");
0 0 if (!SvPOK_spec(header)) croak("FATAL: header must be string/buffer scalar");
0 0 if (!SvPOK_spec(header)) croak("FATAL: header must be string/buffer scalar");
0 0 if (!SvPOK_spec(header)) croak("FATAL: header must be string/buffer scalar");
245 0 14 if(id==-1) croak("FATAL: find_cipher failed for '%s'", cipher_name);
246 10 4 output = NEWSV(0, ct_len > 0 ? ct_len : 1); /* avoid zero! */
251 14 0 if (tag_len > 0) {
258 14 0 if (rv != CRYPT_OK || stat != 1) {
4 10 if (rv != CRYPT_OK || stat != 1) {
260 0 4 XPUSHs(sv_2mortal(newSVpvn(NULL,0))); /* undef */
263 0 10 XPUSHs(sv_2mortal(output));