You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 14, 2020. It is now read-only.
The hash module is a great package when using standalone. However, I was thinking of making handful of changes to make it jell well in the AdonisJs ecosystem.
Using AdonisJs manager
The @poppinss/manager package is something I am planning to use for every component, which uses the builder pattern or has driver based API.
The package assumes that you will make use of the IoC container, which makes sense for AdonisJs, but not for packages to be used standalone. To encounter that, we need to write bit of extra code and hide the IoC container layer from the end user.
The HashStandalone is shared for standalone usage.
Using driver over use.
Since, I am planning to keep the API identical everywhere, I would love to replace use with driver method, and driver method already exists on the Manager class.
Using PHC string format
The Phc string format encodes the hashing info within the hash string and it makes it possible to upgrade older hash values whenever required.
Adding needsRehash
You shared this with me earlier and I think, it's a good idea to add support for needsRehash and we will need PHC string format for that.
WHAT YEAH THINK?
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The
hash
module is a great package when using standalone. However, I was thinking of making handful of changes to make it jell well in the AdonisJs ecosystem.Using AdonisJs manager
The @poppinss/manager package is something I am planning to use for every component, which uses the
builder pattern
or hasdriver based API
.The package assumes that you will make use of the IoC container, which makes sense for AdonisJs, but not for packages to be used standalone. To encounter that, we need to write bit of extra code and hide the IoC container layer from the end user.
Main hash class
Now when we register the
Hash
class as a provider to the IoC container, we can provider theIoc container
reference to the class constructor.When using it standalone, we can wrap this class inside another class.
The
HashStandalone
is shared for standalone usage.Using
driver
overuse
.Since, I am planning to keep the API identical everywhere, I would love to replace
use
withdriver
method, anddriver
method already exists on theManager
class.Using PHC string format
The Phc string format encodes the hashing info within the hash string and it makes it possible to upgrade older hash values whenever required.
Adding
needsRehash
You shared this with me earlier and I think, it's a good idea to add support for
needsRehash
and we will needPHC string format
for that.WHAT YEAH THINK?
The text was updated successfully, but these errors were encountered: