-
-
Notifications
You must be signed in to change notification settings - Fork 48
Closed
Description
Current in few places we are using hashing algorithms, like for example in Rows::hash() function.
The definition of this method looks like that:
Rows::hash(string $algorithm = 'xxh128', bool $binary = false, array $options = []) : stringAnother exampole would be Flow\ETL\Function\Hash or GroupBy (that is using hashing internally)
What we should do instead is replace it with already exising abstraction Flow\ETL\Hash\Algorith which is just a simple interface in all of those places and simply pass NativePHPHash instance as a default.
So for example Rows could look like this:
- Rows::hash(string $algorithm = 'xxh128', bool $binary = false, array $options = []) : string
+ Rows::hash(Algorith $algorithm = new NativePHPHash()) : stringIf any of the adapters (like for example elasticsearch) are also using some form o hashing, they should as well be converted to relay on Algorithm interface.
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Done