Methods
-
EncUtil.getRequestKeyFromEncryptedData(encryptedDataBase64)
-
Gets the request key from encrypted data.
Parameters:
Name Type Description encryptedDataBase64
Returns:
- Type
- string | null
-
EncUtil.isDataEncrypted(data)
-
Checks if the provided data string is encrypted.
Parameters:
Name Type Description data
Returns:
Returns `true` if the provided data string is encrypted.- Type
- boolean
-
EncUtil.isEncryptionSupported()
-
Checks if encryption is supported in the current data context.
Returns:
Returns `true` if encryption is supported in the current data context.- Type
- boolean
Examples
When encryption is supported.
EncUtil.isEncryptionSupported(); // => true
When encryption is not supported.
EncUtil.isEncryptionSupported(); // => false
-
EncUtil.isSubmitDataEncryptionNeeded()
-
Checks if encryption is required for submission.
Returns:
Returns `true` if encryption is required for submission.- Type
- boolean
Examples
When encryption is required for submission.
EncUtil.isSubmitDataEncryptionNeeded(); // => true
When encryption is not required for submission.
EncUtil.isSubmitDataEncryptionNeeded(); // => false
-
EncUtil.tmDecryptData(encryptedDataBase64)
-
TM Form Data Decryption
Parameters:
Name Type Description encryptedDataBase64
Returns:
- Type
- deferred.promise | Object
-
EncUtil.tmEncryptData(data, requestKey)
-
TM Form Data Encryption Please note the data encryption/decryption only works in: - Modern browsers (Chrome v44+, Firefox, Edge v20+) - IE 11 TM will make sure data is not encrypted in other browsers, hence these methods will not be called in this case You should also avoid calling the following three methods explicitly if browser is not listed above
Parameters:
Name Type Description data
requestKey
Returns:
- Type
- deferred.promise | Object