- All Superinterfaces:
org.refcodes.security.Decrypter<String,
,String, org.refcodes.security.DecryptionException> org.refcodes.mixin.Disposable
- All Known Implementing Classes:
DecryptionProviderImpl
public interface DecryptionProvider
extends org.refcodes.security.Decrypter<String,String,org.refcodes.security.DecryptionException>
The
DecryptionProvider
is bound to a namespace and is being used by
the business logic to decrypt data.
The DecryptionProvider
provides decrypting functionality as encrypted
data must be decrypted again by another service or system. This system must
now be able to retrieve all known ciphers versions (by a
DecryptionService
) for determining the correct cipher for decrypting
encrypted text (as encrypted text is prefixed by the cipher UID identifying
the cipher to use for decryption).
-
Method Summary
Modifier and TypeMethodDescriptiontoDecrypted
(String aEncryptedText) Encrypts a text with the latest known valid cipher.Methods inherited from interface org.refcodes.security.Decrypter
decrypt, decrypt, toDecrypted
Methods inherited from interface org.refcodes.mixin.Disposable
dispose
-
Method Details
-
toDecrypted
Encrypts a text with the latest known valid cipher.- Specified by:
toDecrypted
in interfaceorg.refcodes.security.Decrypter<String,
String, org.refcodes.security.DecryptionException> - Parameters:
aEncryptedText
- The text to be encrypted- Returns:
- The encrypted text with a version prefixed identifying the cipher being used for encryption.
- Throws:
UnknownCipherUidException
- in case the cipher UID prefixed to the encrypted text is unknownNoCipherUidException
- in case no cipher UID was found prefixed to the provided text.
-