Skip to content

Commit

Permalink
Fix File::verify(), forgot File docs
Browse files Browse the repository at this point in the history
  • Loading branch information
paragonie-scott committed Nov 6, 2015
1 parent 576429c commit f484547
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
50 changes: 50 additions & 0 deletions doc/Classes/File.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# File

**Namespace**: `\ParagonIE\Halite`

## Methods

### `checksum()`

> `public static` checksum(`$filepath`, [`AuthenticationKey`](Symmetric/AuthenticationKey.md) `$key = null`, `$raw = false`) : `string`
Calculates a BLAKE2b-512 hash of the given file.

* `$filepath` - Path to a file (or an open file handle)
* `$key` (optional)
* `$raw` - Set to `TRUE` if you don't want a hexadecimal string returned

### `encrypt()`

> `public static` encrypt(`$input`, `$output`, [`EncryptionKey`](Symmetric/EncryptionKey.md) `$key`) : `string`


### `decrypt()`

> `public static` decrypt(`$input`, `$output`, [`EncryptionKey`](Symmetric/EncryptionKey.md) `$key`) : `string`



### `seal()`

> `public static` seal(`$input`, `$output`, [`EncryptionPublicKey`](Asymmetric/EncryptionPublicKey.md) `$key`) : `string`


### `unseal()`

> `public static` unseal(`$input`, `$output`, [`EncryptionSecretKey`](Asymmetric/EncryptionSecretKey.md) `$key`) : `string`


### `sign()`

> `public static` sign(`$input`, [`SignatureSecretKey`](Asymmetric/SignatureSecretKey.md) `$key`, `boolean $raw_binary`) : `string`


### `verify()`

> `public static` sign(`$input`, [`SignaturePublicKey`](Asymmetric/SignaturePublicKey.md) `$key`, `string $signature`, `boolean $raw_binary`) : `boolean`
3 changes: 3 additions & 0 deletions src/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,13 +194,15 @@ public static function sign(
*
* @param string|resource $filename
* @param SignaturePublicKey $publickey
* @param string $signature
* @param bool $raw_binary
*
* @return string
*/
public static function verify(
$filename,
KeyInterface $publickey,
$signature,
$raw_binary = false
) {
if (
Expand All @@ -210,6 +212,7 @@ public static function verify(
return self::verifyStream(
new ReadOnlyFile($filename),
$publickey,
$signature,
$raw_binary
);
}
Expand Down

0 comments on commit f484547

Please sign in to comment.