diff options
author | Karel Miko <karel.miko@gmail.com> | 2018-04-08 14:08:07 +0200 |
---|---|---|
committer | Karel Miko <karel.miko@gmail.com> | 2018-04-08 14:08:07 +0200 |
commit | b0e17181f74c35e561af261b901c4e88ebe6d38d (patch) | |
tree | eafe3d67f43d145cfdbccd57d92b7fe1aafb9d49 /_generators | |
parent | a428ba77bbe08f94a0a153ebb9df97862782b241 (diff) |
adopt to updated ltc
Diffstat (limited to '_generators')
-rw-r--r-- | _generators/Mac.xs.inc.tt | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/_generators/Mac.xs.inc.tt b/_generators/Mac.xs.inc.tt index 781cf2f9..ebcbbe5c 100644 --- a/_generators/Mac.xs.inc.tt +++ b/_generators/Mac.xs.inc.tt @@ -128,17 +128,17 @@ mac(Crypt::Mac::[%orig_name%] self) [%-END%] outlen = sizeof(out); if (ix == 3) { - rv = base64url_encode(mac, maclen, (unsigned char*)out, &outlen); + rv = base64url_encode(mac, maclen, out, &outlen); if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn(out, outlen); } if (ix == 2) { - rv = base64_encode(mac, maclen, (unsigned char*)out, &outlen); + 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) { - rv = base16_encode(mac, maclen, (unsigned char *)out, &outlen, 0); + 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); } @@ -248,19 +248,19 @@ SV * outlen = sizeof(out); if (ix == 3) { - rv = base64url_encode(mac, len, (unsigned char *)out, &outlen); + rv = base64url_encode(mac, len, out, &outlen); if (rv != CRYPT_OK) croak("FATAL: base64url_encode failed: %s", error_to_string(rv)); RETVAL = newSVpvn((char *) out, outlen); } else if (ix == 2) { - rv = base64_encode(mac, len, (unsigned char *)out, &outlen); + rv = base64_encode(mac, len, out, &outlen); if (rv != CRYPT_OK) croak("FATAL: base64_encode failed: %s", error_to_string(rv)); - RETVAL = newSVpvn((char *) out, outlen); + RETVAL = newSVpvn(out, outlen); } else if (ix == 1) { - rv = base16_encode(mac, len, (unsigned char *)out, &outlen, 0); + rv = base16_encode(mac, len, out, &outlen, 0); if (rv != CRYPT_OK) croak("FATAL: base16_encode failed: %s", error_to_string(rv)); - RETVAL = newSVpvn((char *) out, outlen); + RETVAL = newSVpvn(out, outlen); } else { RETVAL = newSVpvn((char *) mac, len); |