Expose CSPRNG, constant-time string compare #1

Merged
merged 2 commits into from May 3, 2015

Projects

None yet

2 participants

@paragonie-scott
Contributor

New methods:

  • hashEquals() - constant-time string comparison
  • randomBytes() - pulls random bytes from whichever entropy source is available
  • safeStrlen() - mbstring.func_overload-safe strlen() (used by hashEquals())
paragonie-scott added some commits May 3, 2015
@paragonie-scott paragonie-scott Expose CSPRNG, constant-time string compare
New methods:

* `hashEquals()`
* `randomBytes()`
* `safeStrlen()`
89195eb
@paragonie-scott paragonie-scott Slight improvement
Optimize `hashEquals()` by caching the result of `function_exists()`.

Also fixed a slight inconsistency with `phpversion()`.
88d5257
@bitbeans
Owner
bitbeans commented May 3, 2015

Thank you scott!

@bitbeans bitbeans merged commit a86c485 into bitbeans:master May 3, 2015
@paragonie-scott paragonie-scott deleted the unknown repository branch May 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment