PHP Classes
elePHPant
Icontem

File: src/Contract/BackendInterface.php

Recommend this page to a friend!
  Classes of Scott Arciszewski  >  Cipher Sweet  >  src/Contract/BackendInterface.php  >  Download  
File: src/Contract/BackendInterface.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Cipher Sweet
Encrypt data in away that can be searched
Author: By
Last change:
Date: 8 months ago
Size: 1,328 bytes
 

Contents

Class file image Download
<?php
namespace ParagonIE\CipherSweet\Contract;

use
ParagonIE\CipherSweet\Backend\Key\SymmetricKey;

/**
 * Interface BackendInterface
 * @package ParagonIE\CipherSweet\Contract
 */
interface BackendInterface
{
   
/**
     * @param string $plaintext
     * @param SymmetricKey $key
     * @return string
     */
   
public function encrypt($plaintext, SymmetricKey $key);

   
/**
     * @param string $ciphertext
     * @param SymmetricKey $key
     * @return string
     */
   
public function decrypt($ciphertext, SymmetricKey $key);

   
/**
     * @param string $plaintext
     * @param SymmetricKey $key
     * @param int|null $bitLength
     *
     * @return string
     */
   
public function blindIndexFast(
       
$plaintext,
       
SymmetricKey $key,
       
$bitLength = null
   
);

   
/**
     * @param string $plaintext
     * @param SymmetricKey $key
     * @param int|null $bitLength
     * @param array $config
     *
     * @return string
     */
   
public function blindIndexSlow(
       
$plaintext,
       
SymmetricKey $key,
       
$bitLength = null,
        array
$config = []
    );

   
/**
     * @param string $tableName
     * @param string $fieldName
     * @param string $indexName
     * @return string
     */
   
public function getIndexTypeColumn($tableName, $fieldName, $indexName);
}