You are here

class EncryptionMethod in Encrypt 8.3

Defines a EncryptionMethod annotation object.

Hierarchy

Expanded class hierarchy of EncryptionMethod

3 classes are annotated with EncryptionMethod
AsymmetricalEncryptionMethod in tests/modules/encrypt_test/src/Plugin/EncryptionMethod/AsymmetricalEncryptionMethod.php
Encryption-only encryption method, it can NOT decrypt.
ConfigTestEncryptionMethod in tests/modules/encrypt_test/src/Plugin/EncryptionMethod/ConfigTestEncryptionMethod.php
ConfigTestEncryptionMethod testing class.
TestEncryptionMethod in tests/modules/encrypt_test/src/Plugin/EncryptionMethod/TestEncryptionMethod.php
TestEncryptionMethod testing class.

File

src/Annotation/EncryptionMethod.php, line 14

Namespace

Drupal\encrypt\Annotation
View source
class EncryptionMethod extends Plugin {

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * The human-readable name of the encryption method.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $title;

  /**
   * The description shown to users.
   *
   * @var \Drupal\Core\Annotation\Translation
   *
   * @ingroup plugin_translatable
   */
  public $description = '';

  /**
   * Define key type(s) this encryption method should be restricted to.
   *
   * Return an array of KeyType plugin IDs that restrict the allowed key types
   * for usage with this encryption method.
   *
   * @var array
   */
  public $key_type = [];

  /**
   * Define if the encryption method can also decrypt.
   *
   * In some scenario the key linked to the encryption method may not be able
   * to decrypt, i.e. for asymmetrical encryption methods, where the key is a
   * public key.
   *
   * @var bool
   */
  public $can_decrypt = TRUE;

  /**
   * Define if the encryption method is considered deprecated.
   *
   * As time passes, some encryption methods become obsolete, and it is
   * necessary that they no longer be used to create new encryption profiles.
   * Encryption methods marked deprecated can only be used with existing
   * profiles, and the user will be alerted to change to a better method.
   *
   * @var bool
   */
  public $deprecated = FALSE;

}

Members

Namesort descending Modifiers Type Description Overrides
EncryptionMethod::$can_decrypt public property Define if the encryption method can also decrypt.
EncryptionMethod::$deprecated public property Define if the encryption method is considered deprecated.
EncryptionMethod::$description public property The description shown to users.
EncryptionMethod::$id public property The plugin ID.
EncryptionMethod::$key_type public property Define key type(s) this encryption method should be restricted to.
EncryptionMethod::$title public property The human-readable name of the encryption method.
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2