Skip to content

Commit

Permalink
Update documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-security committed Jan 15, 2018
1 parent 1dfc2a4 commit 03deec4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 14 deletions.
12 changes: 12 additions & 0 deletions doc/Classes/Asymmetric/Crypto.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,15 @@ Calculates a digital signature of `$message`, using [`sodium_crypto_sign()`](htt
> `public` verify(`string $message`, [`SignaturePublicKey`](SignaturePublicKey.md) `$secretKey`, `string $signature`, `$encoding = Halite::ENCODE_BASE64URLSAFE`) : `boolean`
Does the signature match the contents of the message, for the given public key?

### `signAndEncrypt()`

> `public` signAndEncrypt(`HiddenString $message`, [`SignatureSecretKey`](SignatureSecretKey.md) `$secretKey`, [`PublicKey`](PublicKey.md) `$recipientPublicKey`, `$encoding = Halite::ENCODE_BASE64URLSAFE`) : `string`
Signs and encrypts a message. Note that a `SignaturePublicKey` or `EncryptionPublicKey`
is acceptable for the third argument. This is intended to facilitate the GPG use-case.

> `public` verifyAndDecrypt(`string $message`, [`SignaturePublicKey`](SignaturePublicKey.md) `$secretKey`, [`SecretKey`](SecretKey.md) `$mySecretKey`, `$encoding = Halite::ENCODE_BASE64URLSAFE`) : `HiddenString`
Decrypts and verifies a message. Note that a `SignatureSecretKey` or `EncryptionSecretKey`
is acceptable for the third argument. This is intended to facilitate the GPG use-case.
14 changes: 0 additions & 14 deletions doc/Classes/Util.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,6 @@ Returns a copy of a string without triggering PHP's optimizations. The
string returned by this method can safely be used with `sodium_memzero()`
without corrupting other copies of the same string.

### `safeStrlen()`

> `public static` safeStrlen(`string $str`): `int`
Designed to withstand `mbstring.func_overload`, this function will always return
the number of bytes in a string rather than UTF-8 characters.

### `safeSubstr()`

> `public static` safeSubstr(`string $str`, `int $start`, `int $length = null`): `string`
Get a substring of raw binary data (immune to being broken by
`mbstring.func_overload`).

### `xorStrings()`

> `public static` xorStrings(`string $left`, `string $right`): `string`
Expand Down

0 comments on commit 03deec4

Please sign in to comment.