Skip to content

Commit

Permalink
Update README to add a note about the new namespaced API.
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Apr 12, 2017
1 parent 6dd5ad9 commit 775f3ff
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,11 @@ Generally: If you replace `\Sodium\ ` with `ParagonIE_Sodium_Compat::`, any
code already written for the libsodium PHP extension should work with our
polyfill without additional code changes.

Since version 0.7.0, we have our own namespaced API (`ParagonIE\Sodium\*`) to allow brevity
in software that uses PHP 5.3+. This is useful if you want to use our file cryptography
features without writing `ParagonIE_Sodium_File` every time. This is not exposed on PHP < 5.3,
so if your project supports PHP < 5.3, use the underscore method instead.

To learn how to use Libsodium, read [*Using Libsodium in PHP Projects*](https://paragonie.com/book/pecl-libsodium).

## Help, Sodium_Compat is Slow! How can I make it fast?
Expand Down

0 comments on commit 775f3ff

Please sign in to comment.