Skip to content

Conversation

@paragonie-scott
Copy link
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())

New methods:

* `hashEquals()`
* `randomBytes()`
* `safeStrlen()`
Optimize `hashEquals()` by caching the result of `function_exists()`.

Also fixed a slight inconsistency with `phpversion()`.
@bitbeans
Copy link
Owner

bitbeans commented May 3, 2015

Thank you scott!

bitbeans added a commit that referenced this pull request May 3, 2015
Expose CSPRNG, constant-time string compare
@bitbeans bitbeans merged commit a86c485 into bitbeans:master May 3, 2015
@paragonie-scott paragonie-scott deleted the patch-1 branch May 3, 2015 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants