interface EncryptionInterface in Ubercart 8.4
Provides common interface for encryption methods.
Hierarchy
- interface \Drupal\uc_store\EncryptionInterface
Expanded class hierarchy of EncryptionInterface
All classes that implement EncryptionInterface
File
- uc_store/
src/ EncryptionInterface.php, line 8
Namespace
Drupal\uc_storeView source
interface EncryptionInterface {
/**
* Encrypts plaintext.
*
* @param string $key
* Key used for encryption.
* @param string $plaintext
* Text string to be encrypted.
* @param int $sourcelen
* Minimum $plaintext length. Plaintext which is shorter than
* $sourcelen will be padded by appending spaces.
*
* @return string
* Cyphertext. String containing encrypted text.
*/
public function encrypt($key, $plaintext, $sourcelen);
/**
* Decrypts cyphertext.
*
* @param string $key
* Key used for encryption.
* @param string $cyphertext
* String containing text to be encrypted.
*
* @return string
* Plaintext. Decrypted text.
*/
public function decrypt($key, $cyphertext);
/**
* Accessor for errors property.
*
* @return array
* Array of text strings containing error messages.
*/
public function getErrors();
/**
* Mutator for errors property.
*
* @param array $errors
* Array of text strings containing error messages.
*
* @return $this
*/
public function setErrors(array $errors);
/**
* Sets the cypher used.
*
* @param string $cypher
* The cypher to use.
*
* @return $this
*/
public function setCypher($cypher);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EncryptionInterface:: |
public | function | Decrypts cyphertext. | 2 |
EncryptionInterface:: |
public | function | Encrypts plaintext. | 2 |
EncryptionInterface:: |
public | function | Accessor for errors property. | 2 |
EncryptionInterface:: |
public | function | Sets the cypher used. | 2 |
EncryptionInterface:: |
public | function | Mutator for errors property. | 2 |