From e0c2ca8624ebbf1a2c6ff9cff3d1284236e327e2 Mon Sep 17 00:00:00 2001 From: kkadosh Date: Tue, 15 May 2018 15:08:34 +0000 Subject: Refactor the encryption process to extract encrypt/decrypt functions (#176) Refactor the encryption process to extract encrypt/decrypt functions --- src/sp_crypt.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/sp_crypt.h (limited to 'src/sp_crypt.h') diff --git a/src/sp_crypt.h b/src/sp_crypt.h new file mode 100644 index 0000000..1852a0a --- /dev/null +++ b/src/sp_crypt.h @@ -0,0 +1,17 @@ +#ifndef __SP_CRYPT +#define __SP_CRYPT + +#include "SAPI.h" +#include "tweetnacl.h" + +#include "sp_utils.h" + +#include "ext/hash/php_hash.h" +#include "ext/hash/php_hash_sha.h" +#include "ext/standard/base64.h" + +static void generate_key(unsigned char *key); +int decrypt_zval(zval *pDest, bool simulation, zend_hash_key *hask_key); +zend_string *encrypt_zval(char *data, unsigned long long data_len); + +#endif /*__SP_CRYPT */ \ No newline at end of file -- cgit v1.3