Package ch.privately.owas.csam
Enum Class CsamAnalyzer
- All Implemented Interfaces:
Serializable
,Comparable<CsamAnalyzer>
,Constable
Detects CSAM in an images, using a combination of nudity detection and facial age estimation.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsCsam(android.graphics.Bitmap image)
Detects if an image contains CSAM.void
init(android.content.Context context)
Initialize the CsamAnalyzer.static CsamAnalyzer
Returns the enum constant of this class with the specified name.static CsamAnalyzer[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
INSTANCE
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
init
public void init(android.content.Context context) throws IllegalStateException, IOException, InvalidKeyExceptionInitialize the CsamAnalyzer.- Parameters:
context
- The context to use for initialisation.- Throws:
IllegalStateException
- Thrown if PrivatelyCore hasn't been initialized.IOException
- Thrown if some files can't be accessed.InvalidKeyException
- Thrown if the key for model decryption is invalid.
-
containsCsam
Detects if an image contains CSAM.- Parameters:
image
- The image to analyse for CSAM content.- Returns:
- true if CSAM is detected in the image, false otherwise.
- Throws:
IllegalStateException
- Thrown if the CsamAnalyzer is not initialized.
-