Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add security/pecl-xxtea, XXTEA encryption algorithm extension for PHP. MFH: 2024Q1
- Loading branch information
Yasuhiro Kimura
authored and
Yasuhiro Kimura
committed
Mar 13, 2024
1 parent
eaec7c2
commit de40af5
Showing
5 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
PORTNAME= xxtea | ||
DISTVERSION= 1.0.11 | ||
CATEGORIES= security | ||
|
||
MAINTAINER= yasu@FreeBSD.org | ||
COMMENT= XXTEA encryption algorithm extension for PHP | ||
WWW= https://github.com/xxtea/xxtea-pecl | ||
|
||
LICENSE= MIT | ||
LICENSE_FILE= ${WRKSRC}/LICENSE.md | ||
|
||
USES= dos2unix php:pecl | ||
|
||
.include <bsd.port.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
TIMESTAMP = 1710288047 | ||
SHA256 (PECL/xxtea-1.0.11.tgz) = 5b1e318d3e70b27ad017d125d09ba3cf7bb3859e11be864a7bc3ddba421108af | ||
SIZE (PECL/xxtea-1.0.11.tgz) = 7404 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- php_xxtea.c.orig 2024-03-12 22:05:18 UTC | ||
+++ php_xxtea.c | ||
@@ -275,7 +275,7 @@ ZEND_FUNCTION(xxtea_encrypt) { | ||
size_t i, ret_length; | ||
uint8_t fixed_key[16]; | ||
|
||
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &data, &data_len, &key, &key_len) == FAILURE) { | ||
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &data, &data_len, &key, &key_len) == FAILURE) { | ||
return; | ||
} | ||
if (data_len == 0) { | ||
@@ -308,7 +308,7 @@ ZEND_FUNCTION(xxtea_decrypt) { | ||
size_t i, ret_length; | ||
uint8_t fixed_key[16]; | ||
|
||
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss", &data, &data_len, &key, &key_len) == FAILURE) { | ||
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ss", &data, &data_len, &key, &key_len) == FAILURE) { | ||
return; | ||
} | ||
if (data_len == 0) { | ||
@@ -340,7 +340,7 @@ ZEND_MINIT_FUNCTION(xxtea) { | ||
ZEND_MINIT_FUNCTION(xxtea) { | ||
zend_class_entry ce; | ||
INIT_CLASS_ENTRY(ce, "XXTEA", xxtea_method); | ||
- xxtea_ce = zend_register_internal_class(&ce TSRMLS_CC); | ||
+ xxtea_ce = zend_register_internal_class(&ce); | ||
return SUCCESS; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
XXTEA is a fast and secure encryption algorithm. This is a XXTEA | ||
extension for PHP. It is different from the original XXTEA encryption | ||
algorithm. It encrypts and decrypts string instead of uint32 array, | ||
and the key is also string. |