Package org.mycore.crypt
Class MCRCipherManager
java.lang.Object
org.mycore.crypt.MCRCipherManager
Create Instances of MCRCipher as configured in mycore.properties.
The cipher is defined by the java class.
The secret key is saved in an keyfile.
MCR.Crypt.Cipher.abstract.Class=org.mycore.crypt.MCRAESCipher
MCR.Crypt.Cipher.abstract.KeyFile=example_1.secret
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
MCRCipherManager
public MCRCipherManager()
-
-
Method Details
-
getCipher
Create a single instance of a MCRCipher and initialize it. If the cipher can't initialized an exception will thrown. Common issue is an missing key. In this case the methods throws a MCRCryptKeyFileNotFoundException.- Parameters:
id
- ID of cipher as configured- Returns:
- instance of cipher
- Throws:
MCRCryptKeyFileNotFoundException
-
getUninitialisedCipher
Create a single instance of a MCRCipher without initialising it. The resulting instance can used to generate an new key.- Parameters:
id
- ID of cipher as configured- Returns:
- instance of cipher
-