Class NoopKeyIdCryptoService
java.lang.Object
ch.admin.bit.jeap.crypto.internal.core.noop.NoopKeyIdCryptoService
- All Implemented Interfaces:
KeyIdCryptoService
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 -
Method Summary
Modifier and TypeMethodDescriptionbooleancanDecrypt(byte[] ciphertext) byte[]decrypt(byte[] ciphertextCryptoContainer) Decrypts a jEAP crypto container back to the plaintext bytes.byte[]Encrypts plaintext to a jEAP crypto container, using the wrapping key identified by the given key id for the encryption of the data.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.admin.bit.jeap.crypto.api.KeyIdCryptoService
knows
-
Constructor Details
-
NoopKeyIdCryptoService
-
-
Method Details
-
encrypt
Description copied from interface:KeyIdCryptoServiceEncrypts plaintext to a jEAP crypto container, using the wrapping key identified by the given key id for the encryption of the data.- Specified by:
encryptin interfaceKeyIdCryptoService- Parameters:
plaintext- Plaintext bytes to be encryptedkeyId- Identifier for the wrapping key to be used for the encryption- Returns:
- Encrypted data container, formatted according to a
JeapCryptoDataFormat
-
decrypt
public byte[] decrypt(byte[] ciphertextCryptoContainer) Description copied from interface:KeyIdCryptoServiceDecrypts a jEAP crypto container back to the plaintext bytes.- Specified by:
decryptin interfaceKeyIdCryptoService- Parameters:
ciphertextCryptoContainer- Encrypted data container, formatted according to aJeapCryptoDataFormat- Returns:
- Decrypted plaintext bytes
-
configuredKeyIds
- Specified by:
configuredKeyIdsin interfaceKeyIdCryptoService
-
canDecrypt
public boolean canDecrypt(byte[] ciphertext) - Specified by:
canDecryptin interfaceKeyIdCryptoService
-