Skip to content
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

Fix hash family functions signatures #880

Closed
wants to merge 1 commit into from

Conversation

norkunas
Copy link
Contributor

No description provided.

@ondrejmirtes
Copy link
Member

Perhaps you can modify more similar functions like md5, hash, etc.? Thanks.

@norkunas norkunas force-pushed the patch-1 branch 2 times, most recently from a2052a4 to cef0969 Compare December 22, 2021 08:45
@norkunas norkunas changed the title Sha1 return non-empty-string Fix hash family functions signatures Dec 22, 2021
resources/functionMap.php Outdated Show resolved Hide resolved
@norkunas
Copy link
Contributor Author

I just don't understand why there in 'raw_output='=>'bool' was an equal sign as suffix, there are also more places like this but not all signatures follows that. What's the purpose of it?

@staabm
Copy link
Contributor

staabm commented Dec 22, 2021

I think it would also work for crc32 and crypt

@@ -45,7 +45,7 @@
'get_resource_id' => ['int', 'res'=>'resource'],
'gmdate' => ['string', 'format'=>'string', 'timestamp='=>'int'],
'gmmktime' => ['int|false', 'hour'=>'int', 'minute='=>'int', 'second='=>'int', 'month='=>'int', 'day='=>'int', 'year='=>'int'],
'hash_hkdf' => ['string', 'algo'=>'string', 'ikm'=>'string', 'length='=>'int', 'info='=>'string', 'salt='=>'string'],
'hash_hmac' => ['non-empty-string', 'algo'=>'string', 'data'=>'string', 'key'=>'string', 'binary='=>'bool'],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you intentionally replace hash_hkdf with hash_hmac?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, sorry :D

@staabm
Copy link
Contributor

staabm commented Dec 22, 2021

note: there is some overlap with #822

@norkunas
Copy link
Contributor Author

norkunas commented Dec 22, 2021

note: there is some overlap with #822

Then I think I could close this one as that PR is more complete :) it's just missing sha functions

@staabm
Copy link
Contributor

staabm commented Jan 19, 2022

I just don't understand why there in 'raw_output='=>'bool' was an equal sign as suffix, there are also more places like this but not all signatures follows that. What's the purpose of it?

@norkunas the format of the config file is described at the top level comment, see

* A '=' following the <arg_name> indicates this arg is optional.

@norkunas
Copy link
Contributor Author

I just don't understand why there in 'raw_output='=>'bool' was an equal sign as suffix, there are also more places like this but not all signatures follows that. What's the purpose of it?

@norkunas the format of the config file is described at the top level comment, see

* A '=' following the <arg_name> indicates this arg is optional.

Thank you

@norkunas norkunas deleted the patch-1 branch February 8, 2022 14:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants