PHP Classes

File: doc/Classes/File.md

Recommend this page to a friend!
  Classes of Scott Arciszewski   Halite   doc/Classes/File.md   Download  
File: doc/Classes/File.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Halite
Perform cryptography operations with libsodium
Author: By
Last change:
Date: 8 years ago
Size: 1,276 bytes
 

Contents

Class file image Download

File

Namespace: \ParagonIE\Halite

Methods

checksum()

> public static checksum($filepath, AuthenticationKey $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 $key) : string

decrypt()

> public static decrypt($input, $output, EncryptionKey $key) : string

seal()

> public static seal($input, $output, EncryptionPublicKey $key) : string

unseal()

> public static unseal($input, $output, EncryptionSecretKey $key) : string

sign()

> public static sign($input, SignatureSecretKey $key, boolean $raw_binary) : string

verify()

> public static sign($input, SignaturePublicKey $key, string $signature, boolean $raw_binary) : boolean