Encryption
ThingWorx provides encryption services and functions to use in your custom services. Encryption and decryption methods are not interchangeable because of the keys used for encryption or decryption, respectively. Make sure to use the correct methods for encryption. The following table shows which encryption methods can be used with which decryption methods. EncryptionServices use the AES cipher and support 128, 192, and 256 bit keys.
Encrypt/Decrypt API
Opposing Compatible API
EncryptionServices.Encrypt
EncryptionFunctions.encryptString
None
EncryptionServices.EncryptPropertyValue
EncryptionFunctions.encryptPropertyValue
None directly; however, you can use the following from the Extension SDK: BaseTypes.ConvertToPrimitive, PasswordPrimitive.convertFromObject, PasswordPrimitive.getDecryptedValue
EncryptionServices.EncryptWithKey
EncryptionServices.DecryptWithKey
EncryptionServices.DecryptWithKey
EncryptionServices.EncryptWithKey
EncryptionFunctions.encryptStringWithKey
EncryptionFunctions.decryptStringWithKey
EncryptionFunctions.decryptStringWithKey
EncryptionFunctions.encryptStringWithKey
EncryptionFunctions.base64EncodeString
EncryptionFunctions.base64DecodeString
EncryptionFunctions.base64DecodeString
EncryptionFunctions.base64EncodeString
EncryptionFunctions.base64EncodeBytes
EncryptionFunctions.base64DecodeBytes
EncryptionFunctions.base64DecodeBytes
EncryptionFunctions.base64EncodeBytes
Was this helpful?