public class DemonstrationGradeEncryptionServiceImpl extends Object implements EncryptionService
| Modifier and Type | Field and Description |
|---|---|
static String |
ALGORITHM |
static String |
HASH_ALGORITHM |
ENCRYPTION_POST_PREFIX, HASH_POST_PREFIX| Constructor and Description |
|---|
DemonstrationGradeEncryptionServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final String ALGORITHM
public static final String HASH_ALGORITHM
public DemonstrationGradeEncryptionServiceImpl() throws Exception
Exceptionpublic boolean isEnabled()
EncryptionServiceisEnabled in interface EncryptionServicepublic String encrypt(Object valueToHide) throws GeneralSecurityException
EncryptionServiceencrypt in interface EncryptionServicevalueToHide - - original valueGeneralSecurityExceptionpublic String decrypt(String ciphertext) throws GeneralSecurityException
EncryptionServicedecrypt in interface EncryptionServiceciphertext - - encrypted valueGeneralSecurityExceptionpublic byte[] encryptBytes(byte[] valueToHide) throws GeneralSecurityException
EncryptionServiceencryptBytes in interface EncryptionServicevalueToHide - - original valueGeneralSecurityExceptionpublic byte[] decryptBytes(byte[] ciphertext) throws GeneralSecurityException
EncryptionServicedecryptBytes in interface EncryptionServiceciphertext - - encrypted valueGeneralSecurityExceptionpublic static String generateEncodedKey() throws Exception
Exceptionpublic void setSecretKey(String secretKey) throws Exception
secretKey - The secretKey to set.Exceptionpublic String hash(Object valueToHide) throws GeneralSecurityException
hash in interface EncryptionServicevalueToHide - - original valueGeneralSecurityExceptionorg.kuali.rice.krad.service.EncryptionService#hash(java.lang.Object)protected void checkEnabled()
Copyright © 2005–2015 The Kuali Foundation. All rights reserved.