Class CryptoUtil
- java.lang.Object
- 
- com.evolveum.midpoint.common.crypto.CryptoUtil
 
- 
 public class CryptoUtil extends Object - Author:
- semancik
 
- 
- 
Constructor SummaryConstructors Constructor Description CryptoUtil()
 - 
Method SummaryAll Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends ObjectType>
 voidcheckEncrypted(ObjectDelta<T> delta)static <T extends ObjectType>
 voidcheckEncrypted(PrismObject<T> object)static voidcheckEncrypted(Collection<? extends ItemDelta> modifications)static <T extends ObjectType>
 Collection<? extends ItemDelta<?,?>>computeReencryptModifications(Protector protector, PrismObject<T> object)static <T extends ObjectType>
 booleancontainsCleartext(PrismObject<T> object)static <T extends ObjectType>
 booleancontainsHashedData(PrismObject<T> object)static <T extends ObjectType>
 voidencryptValues(Protector protector, ObjectDelta<T> delta)Encrypts all encryptable values in delta.static <T extends ObjectType>
 voidencryptValues(Protector protector, PrismObject<T> object)Encrypts all encryptable values in the object.static <T extends ObjectType>
 @NotNull Collection<String>getEncryptionKeyNames(PrismObject<T> object)static <T extends ObjectType>
 intreencryptValues(Protector protector, PrismObject<T> object)Re-encrypts all encryptable values in the object.static voidsecuritySelfTest(OperationResult parentTestResult)
 
- 
- 
- 
Method Detail- 
encryptValuespublic static <T extends ObjectType> void encryptValues(Protector protector, PrismObject<T> object) throws EncryptionException Encrypts all encryptable values in the object.Note: We could use TunnelException here (it would be cleaner) but the tunneled exception could be other than EncryptionException! For example, it could come from RawType, carrying a SchemaException. See MID-6086. So we use throwExceptionAsUnchecked hack instead. - Throws:
- EncryptionException
 
 - 
encryptValuespublic static <T extends ObjectType> void encryptValues(Protector protector, ObjectDelta<T> delta) throws EncryptionException Encrypts all encryptable values in delta.- Throws:
- EncryptionException
 
 - 
checkEncryptedpublic static <T extends ObjectType> void checkEncrypted(PrismObject<T> object) 
 - 
checkEncryptedpublic static <T extends ObjectType> void checkEncrypted(ObjectDelta<T> delta) 
 - 
checkEncryptedpublic static void checkEncrypted(Collection<? extends ItemDelta> modifications) 
 - 
securitySelfTestpublic static void securitySelfTest(OperationResult parentTestResult) 
 - 
computeReencryptModificationspublic static <T extends ObjectType> Collection<? extends ItemDelta<?,?>> computeReencryptModifications(Protector protector, PrismObject<T> object) throws EncryptionException - Throws:
- EncryptionException
 
 - 
reencryptValuespublic static <T extends ObjectType> int reencryptValues(Protector protector, PrismObject<T> object) throws EncryptionException Re-encrypts all encryptable values in the object.- Throws:
- EncryptionException
 
 - 
getEncryptionKeyNames@NotNull public static <T extends ObjectType> @NotNull Collection<String> getEncryptionKeyNames(PrismObject<T> object) 
 - 
containsCleartextpublic static <T extends ObjectType> boolean containsCleartext(PrismObject<T> object) 
 - 
containsHashedDatapublic static <T extends ObjectType> boolean containsHashedData(PrismObject<T> object) 
 
- 
 
-