public interface EncryptionProvider extends org.refcodes.security.Encrypter<String,String,org.refcodes.security.EncryptionException>
EncryptionProvider is bound to a namespace and is being used by
the business logic to encrypt data.
It is merely responsible for retrieving a currently valid cipher for
encrypting data. The EncryptionProvider does not expose the cipher
though it might store it in clear text in-memory only (advanced
implementations might encrypt the in-memory cipher). The (internally)
retrieved cipher is requested from and provided by an
EncryptionService (on the same machine) which takes care of providing
(and creating) a cipher with a cipher UID as well as publishing the according
CipherVersion (via the EncryptionServer to the
DecryptionServer). As the EncryptionProvider does not persist
any data, an in-memory CipherVersion will only be used as long as the
EncryptionProvider is up-and-running. In case of a restart, a new
cipher for encryption is requested from the EncryptionService. Also
the encryption provider can be forced to (create and to) use a next valid
cipher on demand.
| Modifier and Type | Method and Description |
|---|---|
void |
nextCipherVersion()
Forces a next valid cipher to be requested and used.
|
String |
toEncrypted(String aText) |
Copyright © 2018. All rights reserved.