Package org.refcodes.forwardsecrecy
Interface DecryptionProvider
-
- All Superinterfaces:
org.refcodes.security.Decrypter<java.lang.String,java.lang.String,org.refcodes.security.DecryptionException>
- All Known Implementing Classes:
DecryptionProviderImpl
public interface DecryptionProvider extends org.refcodes.security.Decrypter<java.lang.String,java.lang.String,org.refcodes.security.DecryptionException>
TheDecryptionProvider
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 aDecryptionService
) 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
toDecrypted(java.lang.String aEncryptedText)
Encrypts a text with the latest known valid cipher.
-
-
-
Method Detail
-
toDecrypted
java.lang.String toDecrypted(java.lang.String aEncryptedText) throws UnknownCipherUidException, NoCipherUidException
Encrypts a text with the latest known valid cipher.- Specified by:
toDecrypted
in interfaceorg.refcodes.security.Decrypter<java.lang.String,java.lang.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.
-
-