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
Exception
public boolean isEnabled()
EncryptionService
isEnabled
in interface EncryptionService
public String encrypt(Object valueToHide) throws GeneralSecurityException
EncryptionService
encrypt
in interface EncryptionService
valueToHide
- - original valueGeneralSecurityException
public String decrypt(String ciphertext) throws GeneralSecurityException
EncryptionService
decrypt
in interface EncryptionService
ciphertext
- - encrypted valueGeneralSecurityException
public byte[] encryptBytes(byte[] valueToHide) throws GeneralSecurityException
EncryptionService
encryptBytes
in interface EncryptionService
valueToHide
- - original valueGeneralSecurityException
public byte[] decryptBytes(byte[] ciphertext) throws GeneralSecurityException
EncryptionService
decryptBytes
in interface EncryptionService
ciphertext
- - encrypted valueGeneralSecurityException
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 valueGeneralSecurityException
org.kuali.rice.krad.service.EncryptionService#hash(java.lang.Object)
protected void checkEnabled()
Copyright © 2005–2014 The Kuali Foundation. All rights reserved.