Skip to content

Commit 7d584c4

Browse files
committed
Deprecating the McryptRandomByteGenerator
1 parent a951f78 commit 7d584c4

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

src/Robin/Ntlm/Crypt/Random/McryptRandomByteGenerator.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
* "mcrypt" extension.
1717
*
1818
* @link http://php.net/mcrypt
19+
* @deprectated NOTE! This implementation is deprecated, as the mcrypt library
20+
* is abandoned. More info: https://github.com/robinpowered/php-ntlm/pull/1
1921
*/
2022
class McryptRandomByteGenerator implements RandomByteGeneratorInterface
2123
{
@@ -63,9 +65,17 @@ public function __construct($source = self::DEFAULT_SOURCE)
6365

6466
/**
6567
* {@inheritDoc}
68+
*
69+
* @deprectated NOTE! This implementation is deprecated, as the mcrypt
70+
* library is abandoned.
6671
*/
6772
public function generate($size)
6873
{
74+
trigger_error(
75+
'This implementation is deprecated, as the mcrypt library is abandoned',
76+
E_USER_DEPRECATED
77+
);
78+
6979
$generated = mcrypt_create_iv($size, $this->source);
7080

7181
if (false === $generated || strlen($generated) !== $size) {

0 commit comments

Comments
 (0)