Class NoopCryptoService

java.lang.Object
ch.admin.bit.jeap.crypto.internal.core.noop.NoopCryptoService
All Implemented Interfaces:
CryptoService

public class NoopCryptoService extends Object implements CryptoService
Should only be used to bypass encryption and decryption in dev environments. Hence, plaintext and ciphertext are returned untouched. No encryption or decryption is performed.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    decrypt(byte[] ciphertextCryptoContainer)
    Decrypts a jEAP crypto container back to the plaintext bytes.
    byte[]
    encrypt(byte[] plaintext)
    Encrypts plaintext to a jEAP crypto container, using a data key for encryption of the data.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • NoopCryptoService

      public NoopCryptoService()
  • Method Details

    • encrypt

      public byte[] encrypt(byte[] plaintext)
      Description copied from interface: CryptoService
      Encrypts plaintext to a jEAP crypto container, using a data key for encryption of the data.
      Specified by:
      encrypt in interface CryptoService
      Parameters:
      plaintext - Plaintext bytes to be encrypted
      Returns:
      Encrypted data container, formatted according to a JeapCryptoDataFormat
    • decrypt

      public byte[] decrypt(byte[] ciphertextCryptoContainer)
      Description copied from interface: CryptoService
      Decrypts a jEAP crypto container back to the plaintext bytes.
      Specified by:
      decrypt in interface CryptoService
      Parameters:
      ciphertextCryptoContainer - Encrypted data container, formatted according to a JeapCryptoDataFormat
      Returns:
      Decrypted plaintext bytes