|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.rice.core.impl.encryption.DemonstrationGradeEncryptionServiceImpl
public class DemonstrationGradeEncryptionServiceImpl
Implementation of encryption service for demonstration.
Field Summary | |
---|---|
static String |
ALGORITHM
|
static String |
HASH_ALGORITHM
|
Fields inherited from interface org.kuali.rice.core.api.encryption.EncryptionService |
---|
ENCRYPTION_POST_PREFIX, HASH_POST_PREFIX |
Constructor Summary | |
---|---|
DemonstrationGradeEncryptionServiceImpl()
|
Method Summary | |
---|---|
protected void |
checkEnabled()
Performs a check to see if the encryption service is enabled. |
String |
decrypt(String ciphertext)
Decrypts a value |
byte[] |
decryptBytes(byte[] ciphertext)
Decrypts a value |
String |
encrypt(Object valueToHide)
Encrypts a value |
byte[] |
encryptBytes(byte[] valueToHide)
Encrypts a value |
static String |
generateEncodedKey()
This method generates keys. |
String |
hash(Object valueToHide)
Hash the value by converting to a string, running the hash algorithm, and then base64'ng the results. |
boolean |
isEnabled()
Returns true if encryption is enabled within KEW, false otherwise. |
void |
setSecretKey(String secretKey)
Sets the secretKey attribute value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String ALGORITHM
public static final String HASH_ALGORITHM
Constructor Detail |
---|
public DemonstrationGradeEncryptionServiceImpl() throws Exception
Exception
Method Detail |
---|
public boolean isEnabled()
EncryptionService
isEnabled
in interface EncryptionService
public String encrypt(Object valueToHide) throws GeneralSecurityException
EncryptionService
encrypt
in interface EncryptionService
valueToHide
- - original value
GeneralSecurityException
public String decrypt(String ciphertext) throws GeneralSecurityException
EncryptionService
decrypt
in interface EncryptionService
ciphertext
- - encrypted value
GeneralSecurityException
public byte[] encryptBytes(byte[] valueToHide) throws GeneralSecurityException
EncryptionService
encryptBytes
in interface EncryptionService
valueToHide
- - original value
GeneralSecurityException
public byte[] decryptBytes(byte[] ciphertext) throws GeneralSecurityException
EncryptionService
decryptBytes
in interface EncryptionService
ciphertext
- - encrypted value
GeneralSecurityException
public static String generateEncodedKey() throws Exception
Exception
public void setSecretKey(String secretKey) throws Exception
secretKey
- The secretKey to set.
Exception
public String hash(Object valueToHide) throws GeneralSecurityException
hash
in interface EncryptionService
valueToHide
- - original value
GeneralSecurityException
org.kuali.rice.krad.service.EncryptionService#hash(java.lang.Object)
protected void checkEnabled()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |