Skip to content

Commit 67b654c

Browse files
authored
Merge pull request #93 from moufmouf/openssl_encrypt
openssl_encrypt with no 5th argument is failing
2 parents fd18875 + f2ea7fd commit 67b654c

File tree

10 files changed

+480
-249
lines changed

10 files changed

+480
-249
lines changed

generated/functionsList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,6 @@
602602
'openssl_decrypt',
603603
'openssl_dh_compute_key',
604604
'openssl_digest',
605-
'openssl_encrypt',
606605
'openssl_open',
607606
'openssl_pbkdf2',
608607
'openssl_pkcs12_export_to_file',
@@ -1078,4 +1077,5 @@
10781077
'apc_fetch',
10791078
'apcu_fetch',
10801079
'preg_replace',
1080+
'openssl_encrypt',
10811081
];

generated/libxml.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/**
88
* Retrieve last error from libxml.
99
*
10-
* @return object Returns a LibXMLError object if there is any error in the
10+
* @return libXMLError Returns a LibXMLError object if there is any error in the
1111
* buffer, FALSE otherwise.
1212
* @throws LibxmlException
1313
*

generated/openssl.php

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -340,35 +340,6 @@ function openssl_digest(string $data, string $method, bool $raw_output = false):
340340
}
341341

342342

343-
/**
344-
* Encrypts given data with given method and key, returns a raw
345-
* or base64 encoded string
346-
*
347-
* @param string $data The plaintext message data to be encrypted.
348-
* @param string $method The cipher method. For a list of available cipher methods, use openssl_get_cipher_methods.
349-
* @param string $key The key.
350-
* @param int $options options is a bitwise disjunction of the flags
351-
* OPENSSL_RAW_DATA and
352-
* OPENSSL_ZERO_PADDING.
353-
* @param string $iv A non-NULL Initialization Vector.
354-
* @param string $tag The authentication tag passed by reference when using AEAD cipher mode (GCM or CCM).
355-
* @param string $aad Additional authentication data.
356-
* @param int $tag_length The length of the authentication tag. Its value can be between 4 and 16 for GCM mode.
357-
* @return string Returns the encrypted string on success.
358-
* @throws OpensslException
359-
*
360-
*/
361-
function openssl_encrypt(string $data, string $method, string $key, int $options = 0, string $iv = "", string &$tag = null, string $aad = "", int $tag_length = 16): string
362-
{
363-
error_clear_last();
364-
$result = \openssl_encrypt($data, $method, $key, $options, $iv, $tag, $aad, $tag_length);
365-
if ($result === false) {
366-
throw OpensslException::createFromPhpError();
367-
}
368-
return $result;
369-
}
370-
371-
372343
/**
373344
* openssl_open opens (decrypts)
374345
* sealed_data using the private key associated with

generated/shmop.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
/**
88
* shmop_delete is used to delete a shared memory block.
99
*
10-
* @param int $shmid The shared memory block resource created by
10+
* @param resource $shmid The shared memory block resource created by
1111
* shmop_open
1212
* @throws ShmopException
1313
*
@@ -25,7 +25,7 @@ function shmop_delete($shmid): void
2525
/**
2626
* shmop_read will read a string from shared memory block.
2727
*
28-
* @param int $shmid The shared memory block identifier created by
28+
* @param resource $shmid The shared memory block identifier created by
2929
* shmop_open
3030
* @param int $start Offset from which to start reading
3131
* @param int $count The number of bytes to read.
@@ -48,7 +48,7 @@ function shmop_read($shmid, int $start, int $count): string
4848
/**
4949
* shmop_write will write a string into shared memory block.
5050
*
51-
* @param int $shmid The shared memory block identifier created by
51+
* @param resource $shmid The shared memory block identifier created by
5252
* shmop_open
5353
* @param string $data A string to write into shared memory block
5454
* @param int $offset Specifies where to start writing data inside the shared memory

0 commit comments

Comments
 (0)