ThreatCallback class

A class which represents a set of callbacks that are used to notify the application when certain security threat are detected.

// Example of single callback
final callback = ThreatCallback(
  onDebug: () => print('Debug detected'),
);

ThreatCallback is then attached to Talsec instance which handles correct function invocations.

// Attaching callback to Talsec
Talsec.instance.attachListener(callback);

Constructors

ThreatCallback({VoidCallback? onHooks, VoidCallback? onDebug, VoidCallback? onPasscode, VoidCallback? onDeviceID, VoidCallback? onSimulator, VoidCallback? onAppIntegrity, VoidCallback? onObfuscationIssues, VoidCallback? onDeviceBinding, VoidCallback? onUnofficialStore, VoidCallback? onPrivilegedAccess, VoidCallback? onSecureHardwareNotAvailable})
Constructs a ThreatCallback instance.

Properties

hashCode int
The hash code for this object.
no setterinherited
onAppIntegrity VoidCallback?
This method is called when application's integrity is compromised (e.g. invalid signature, package name, signing hash,...).
final
onDebug VoidCallback?
This method is called when an unsafe environment (debugger) is detected.
final
onDeviceBinding VoidCallback?
This method is called when device binding is compromised.
final
onDeviceID VoidCallback?
This method is called when the application was reinstalled.
final
onHooks VoidCallback?
This method is called when a threat related dynamic hooking (e.g. Frida) is detected.
final
onObfuscationIssues VoidCallback?
This method is called when application is not obfuscated.
final
onPasscode VoidCallback?
This method is called when the device has not set any passcode.
final
onPrivilegedAccess VoidCallback?
This method is called when elevated rights are detected on device (e.g. root, jailbreak,...).
final
onSecureHardwareNotAvailable VoidCallback?
This method is called when secure hardware is not available on device.
final
onSimulator VoidCallback?
This method is called when running on simulator/emulator is detected.
final
onUnofficialStore VoidCallback?
This method is called when application was installed from other source then set one in the Talsec SDK.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited