senseCryptUtil
class senseCryptUtil
Undocumented
-
Undocumented
Declaration
Swift
static var fileDownloadSession: FileDownloadSession? -
Undocumented
Declaration
Swift
func getDocumentsDirectory() -> URL? -
performInit()AsynchronousInitializes the SenseCrypt SDK.
Declaration
Swift
static func performInit() async -> Result<Bool, Error>Return Value
A result indicating if the initialization was successful or an error.
-
Downloads the model from remote location and get the status of the download.
Declaration
Swift
static func downloadModels(fileDownloadInfo: [FileDownloadInfo], outputPath: String) throws -> FileDownloadResult?Parameters
fileDownloadInfo- This param take the file download info struct which contains url and file name as a variable
outputPath- This params takes the location path of the folder where the models need to be stored
-
Get the status of the download session
Throws
Throws :- Throw an error if not able to get the status.Declaration
Swift
static func getDownloadStatus() throws -> FileDownloadResult? -
Undocumented
Declaration
Swift
static func parseSensePrintBytes(sensePrintBytes: Data) throws -> SensePrintInfo? -
Undocumented
Declaration
Swift
static func getLicenseInfo() throws -> LicenseInfo -
Verifies a password against a SensePrint.
Throws
An error if verification fails.Declaration
Swift
static func verifyPassword(sensePrintBytes: Data, password: String) throws -> BoolParameters
sensePrintBytesThe SensePrint data.
passwordThe password to verify.
Return Value
A boolean indicating if the password is verified.
-
Performs a liveness check on the given image data.
Declaration
Swift
static func checkLiveness(imageBytes: Data) throws -> BoolParameters
imageBytesThe image data to check.
Return Value
A boolean indicating if the image contains a live face.
-
Refreshes a SensePrint by re-encrypting the previous SensePrint payload with a freshly captured face. Mirrors SenseCryptUtil.refreshSensePrint in the Android SDK.
Declaration
Swift
static func refreshSensePrint(prevSensePrintBytes: Data, password: String?, sessionHolder: SessionHolder) throws -> DataParameters
prevSensePrintBytesThe previous SensePrint bytes (read from the QR code).
passwordThe password for the previous SensePrint (if any).
sessionHolderThe session holder containing the active or passive face capture session.
Return Value
The refreshed SensePrint bytes.