π PHC string format serializer/deserializer
Coded with β€οΈ by Simone Primarosa.
string
Generates a PHC string using the data provided.
Object
Parses data from a PHC string.
string
Generates a PHC string using the data provided.
**Kind**: global function
**Returns**: string
- The hash string adhering to the PHC format.
| Param | Type | Description |
| --- | --- | --- |
| opts | Object
| Object that holds the data needed to generate the PHC string. |
| opts.id | string
| Symbolic name for the function. |
| [opts.version] | Number
| The version of the function. |
| [opts.params] | Object
| Parameters of the function. |
| [opts.salt] | Buffer
| The salt as a binary buffer. |
| [opts.hash] | Buffer
| The hash as a binary buffer. |
### deserialize(phcstr) β Object
Parses data from a PHC string.
**Kind**: global function
**Returns**: Object
- The object containing the data parsed from the PHC string.
| Param | Type | Description |
| --- | --- | --- |
| phcstr | string
| A PHC string to parse. |
## Contributing
Contributions are REALLY welcome and if you find a security flaw in this code, PLEASE [report it][new issue].
Please check the [contributing guidelines][contributing] for more details. Thanks!
## Authors
- **Simone Primarosa** - *Github* ([@simonepri][github:simonepri]) β’ *Twitter* ([@simoneprimarosa][twitter:simoneprimarosa])
See also the list of [contributors][contributors] who participated in this project.
## License
This project is licensed under the MIT License - see the [license][license] file for details.
[start]: https://github.com/simonepri/phc-format#start-of-content
[new issue]: https://github.com/simonepri/phc-format/issues/new
[contributors]: https://github.com/simonepri/phc-format/contributors
[license]: https://github.com/simonepri/phc-format/tree/master/license
[contributing]: https://github.com/simonepri/phc-format/tree/master/.github/contributing.md
[github:simonepri]: https://github.com/simonepri
[twitter:simoneprimarosa]: http://twitter.com/intent/user?screen_name=simoneprimarosa
[specs:mcf]: https://github.com/ademarre/binary-mcf
[specs:phc]: https://github.com/P-H-C/phc-string-format/blob/master/phc-sf-spec.md