Pass the Key entity to the encryption method on encrypt/decrypt

Created on 15 June 2016, almost 9 years ago
Updated 7 July 2024, 10 months ago

Motivation

Currently the Encrypt service passes the key value to the encryption method on encrypt/decrypt.
Passing the entire Key entity would allow for more advanced integration between the method plugin and the Key entity.


An AES encryption method would be able to integrate with an AES encryption key that would hold a reference to the necessary IV (input vector) string.

Proposed solution

  • Modify the encrypt, decrypt & checkDependencies methods on EncryptionMethodInterface to receive \Drupal\key\KeyInterface objects instead of strings.
  • Modify the encrypt & decrypt methods in EncryptService class to pass the \Drupal\key\KeyInterface objects instead of strings to the EncryptionMethod encrypt/decrypt methods.
  • Modify the validate method in EncryptionProfile to pass the \Drupal\key\KeyInterface objects instead of strings to the checkDependencies method on EncryptionMethodInterface.
Feature request
Status

Needs work

Version

3.0

Component

Code

Created by

🇮🇱Israel Eyal Shalev

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • Status changed to Needs work 10 months ago
  • 🇯🇵Japan ptmkenny

    3.x has been released, so this would have to be moved to 4.x. Also, the patch no longer applies to 3.x-dev, so marking "Needs work."

Production build 0.71.5 2024