-
Notifications
You must be signed in to change notification settings - Fork 477
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement OpenSslEncryptParameterOutTypeExtension
#3753
base: 1.12.x
Are you sure you want to change the base?
Conversation
7394404
to
1663a9f
Compare
1663a9f
to
0b93292
Compare
$tag
of openssl_encrypt()
OpenSslEncryptParameterOutTypeExtension
4a82c99
to
e22aae5
Compare
e22aae5
to
d1bad9e
Compare
This pull request has been marked as ready for review. |
d1bad9e
to
35b4a9d
Compare
return null; | ||
} | ||
|
||
$cipherType = current($scope->getType($cipherArg->value)->getConstantStrings()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do you only work on the first cipher type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, I just realised you can do unions of literal strings. Updated the code to check all cases.
35b4a9d
to
b56032b
Compare
b56032b
to
430dfeb
Compare
|
||
$cipherType = $scope->getType($cipherArg->value); | ||
|
||
return TypeTraverser::map($cipherType, static function (Type $type, callable $traverse): Type { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you need the TypeTraverser here. Couldn't you just iterate over getConstantStrings()
?
Ref: https://www.php.net/manual/en/function.openssl-encrypt.php