diff options
author | Karel Miko <karel.miko@gmail.com> | 2023-04-28 14:17:01 +0200 |
---|---|---|
committer | Karel Miko <karel.miko@gmail.com> | 2023-04-28 14:17:01 +0200 |
commit | 5f99973425f326cd4a477e543af91243e1aa3283 (patch) | |
tree | f38d6e1f92d14205df546af0dfbc049d52b90052 /inc | |
parent | d4403a43e4e6c83d687a7859cbf5c9529c1562c4 (diff) |
fix #89 Crypt::Mac::HMAC b64mac and b64umac object methods do not work
Diffstat (limited to 'inc')
-rw-r--r-- | inc/CryptX_Mac_BLAKE2b.xs.inc | 4 | ||||
-rw-r--r-- | inc/CryptX_Mac_BLAKE2s.xs.inc | 4 | ||||
-rw-r--r-- | inc/CryptX_Mac_F9.xs.inc | 4 | ||||
-rw-r--r-- | inc/CryptX_Mac_HMAC.xs.inc | 4 | ||||
-rw-r--r-- | inc/CryptX_Mac_OMAC.xs.inc | 4 | ||||
-rw-r--r-- | inc/CryptX_Mac_PMAC.xs.inc | 4 | ||||
-rw-r--r-- | inc/CryptX_Mac_Pelican.xs.inc | 4 | ||||
-rw-r--r-- | inc/CryptX_Mac_Poly1305.xs.inc | 4 | ||||
-rw-r--r-- | inc/CryptX_Mac_XCBC.xs.inc | 4 |
9 files changed, 18 insertions, 18 deletions
diff --git a/inc/CryptX_Mac_BLAKE2b.xs.inc b/inc/CryptX_Mac_BLAKE2b.xs.inc index a8f51139..b8093294 100644 --- a/inc/CryptX_Mac_BLAKE2b.xs.inc +++ b/inc/CryptX_Mac_BLAKE2b.xs.inc @@ -81,12 +81,12 @@ mac(Crypt::Mac::BLAKE2b self) if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } - if (ix == 2) { + else if (ix == 2) { rv = base64_encode(mac, maclen, out, &outlen); if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } - if (ix == 1) { + else if (ix == 1) { rv = base16_encode(mac, maclen, out, &outlen, 0); if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); diff --git a/inc/CryptX_Mac_BLAKE2s.xs.inc b/inc/CryptX_Mac_BLAKE2s.xs.inc index d1b4292b..a3d42b74 100644 --- a/inc/CryptX_Mac_BLAKE2s.xs.inc +++ b/inc/CryptX_Mac_BLAKE2s.xs.inc @@ -81,12 +81,12 @@ mac(Crypt::Mac::BLAKE2s self) if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } - if (ix == 2) { + else if (ix == 2) { rv = base64_encode(mac, maclen, out, &outlen); if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } - if (ix == 1) { + else if (ix == 1) { rv = base16_encode(mac, maclen, out, &outlen, 0); if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); diff --git a/inc/CryptX_Mac_F9.xs.inc b/inc/CryptX_Mac_F9.xs.inc index aa953c05..eb70e10c 100644 --- a/inc/CryptX_Mac_F9.xs.inc +++ b/inc/CryptX_Mac_F9.xs.inc @@ -85,12 +85,12 @@ mac(Crypt::Mac::F9 self) if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } - if (ix == 2) { + else if (ix == 2) { rv = base64_encode(mac, maclen, out, &outlen); if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } - if (ix == 1) { + else if (ix == 1) { rv = base16_encode(mac, maclen, out, &outlen, 0); if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); diff --git a/inc/CryptX_Mac_HMAC.xs.inc b/inc/CryptX_Mac_HMAC.xs.inc index 5689561e..b87b1267 100644 --- a/inc/CryptX_Mac_HMAC.xs.inc +++ b/inc/CryptX_Mac_HMAC.xs.inc @@ -85,12 +85,12 @@ mac(Crypt::Mac::HMAC self) if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } - if (ix == 2) { + else if (ix == 2) { rv = base64_encode(mac, maclen, out, &outlen); if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } - if (ix == 1) { + else if (ix == 1) { rv = base16_encode(mac, maclen, out, &outlen, 0); if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); diff --git a/inc/CryptX_Mac_OMAC.xs.inc b/inc/CryptX_Mac_OMAC.xs.inc index d17b70c6..7ac72cce 100644 --- a/inc/CryptX_Mac_OMAC.xs.inc +++ b/inc/CryptX_Mac_OMAC.xs.inc @@ -85,12 +85,12 @@ mac(Crypt::Mac::OMAC self) if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } - if (ix == 2) { + else if (ix == 2) { rv = base64_encode(mac, maclen, out, &outlen); if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } - if (ix == 1) { + else if (ix == 1) { rv = base16_encode(mac, maclen, out, &outlen, 0); if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); diff --git a/inc/CryptX_Mac_PMAC.xs.inc b/inc/CryptX_Mac_PMAC.xs.inc index 542b0356..b924479f 100644 --- a/inc/CryptX_Mac_PMAC.xs.inc +++ b/inc/CryptX_Mac_PMAC.xs.inc @@ -85,12 +85,12 @@ mac(Crypt::Mac::PMAC self) if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } - if (ix == 2) { + else if (ix == 2) { rv = base64_encode(mac, maclen, out, &outlen); if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } - if (ix == 1) { + else if (ix == 1) { rv = base16_encode(mac, maclen, out, &outlen, 0); if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); diff --git a/inc/CryptX_Mac_Pelican.xs.inc b/inc/CryptX_Mac_Pelican.xs.inc index b3e9f158..7bb0943d 100644 --- a/inc/CryptX_Mac_Pelican.xs.inc +++ b/inc/CryptX_Mac_Pelican.xs.inc @@ -81,12 +81,12 @@ mac(Crypt::Mac::Pelican self) if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } - if (ix == 2) { + else if (ix == 2) { rv = base64_encode(mac, maclen, out, &outlen); if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } - if (ix == 1) { + else if (ix == 1) { rv = base16_encode(mac, maclen, out, &outlen, 0); if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); diff --git a/inc/CryptX_Mac_Poly1305.xs.inc b/inc/CryptX_Mac_Poly1305.xs.inc index f816e48f..79e5e4ae 100644 --- a/inc/CryptX_Mac_Poly1305.xs.inc +++ b/inc/CryptX_Mac_Poly1305.xs.inc @@ -81,12 +81,12 @@ mac(Crypt::Mac::Poly1305 self) if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } - if (ix == 2) { + else if (ix == 2) { rv = base64_encode(mac, maclen, out, &outlen); if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } - if (ix == 1) { + else if (ix == 1) { rv = base16_encode(mac, maclen, out, &outlen, 0); if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); diff --git a/inc/CryptX_Mac_XCBC.xs.inc b/inc/CryptX_Mac_XCBC.xs.inc index 932e069d..98131ced 100644 --- a/inc/CryptX_Mac_XCBC.xs.inc +++ b/inc/CryptX_Mac_XCBC.xs.inc @@ -85,12 +85,12 @@ mac(Crypt::Mac::XCBC self) if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } - if (ix == 2) { + else if (ix == 2) { rv = base64_encode(mac, maclen, out, &outlen); if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } - if (ix == 1) { + else if (ix == 1) { rv = base16_encode(mac, maclen, out, &outlen, 0); if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); |