PHP Classes

File: src/Contract/StreamInterface.php

Recommend this page to a friend!
  Classes of Scott Arciszewski   Halite   src/Contract/StreamInterface.php   Download  
File: src/Contract/StreamInterface.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: Halite
Perform cryptography operations with libsodium
Author: By
Last change: For version 2, let's use strict types!
Date: 8 years ago
Size: 590 bytes
 

Contents

Class file image Download
<?php
declare(strict_types=1);
namespace
ParagonIE\Halite\Contract;

/**
 *
 */
interface StreamInterface
{
   
/**
     * Read from a stream; prevent partial reads
     *
     * @param int $num
     * @return string
     * @throws FileAlert\AccessDenied
     */
   
public function readBytes(int $num, bool $skipTests = false): string;
   
   
/**
     * Write to a stream; prevent partial writes
     *
     * @param string $buf
     * @param int $num (number of bytes)
     * @throws FileAlert\AccessDenied
     */
   
public function writeBytes(string $buf, int $num = null): int;
}