Class CryptoUtil
java.lang.Object
com.evolveum.midpoint.common.crypto.CryptoUtil
- Author:
- semancik
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends ObjectType>
voidcheckEncrypted
(ObjectDelta<T> delta) static <T extends ObjectType>
voidcheckEncrypted
(PrismObject<T> object) static void
checkEncrypted
(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 void
securitySelfTest
(OperationResult parentTestResult)
-
Constructor Details
-
CryptoUtil
public CryptoUtil()
-
-
Method Details
-
encryptValues
public 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
-
encryptValues
public static <T extends ObjectType> void encryptValues(Protector protector, ObjectDelta<T> delta) throws EncryptionException Encrypts all encryptable values in delta.- Throws:
EncryptionException
-
checkEncrypted
-
checkEncrypted
-
checkEncrypted
-
securitySelfTest
-
computeReencryptModifications
public static <T extends ObjectType> Collection<? extends ItemDelta<?,?>> computeReencryptModifications(Protector protector, PrismObject<T> object) throws EncryptionException - Throws:
EncryptionException
-
reencryptValues
public 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) -
containsCleartext
-
containsHashedData
-