加密
ThingWorx 在出厂设置中提供了可在自定义服务中使用的加密服务和功能。加密和解密方法不可互换,原因在于这两种方法会分别使用加密或解密密钥。请确保使用正确的加密方法。下表显示了哪些解密方法可与哪些加密方法搭配使用。
加密/解密 API
相对的兼容 API
EncryptionServices.Encrypt
EncryptionFunctions.encryptString
“无”(NONE)
EncryptionServices.EncryptPropertyValue
EncryptionFunctions.encryptPropertyValue
无直接调用;但是,可以使用 Extension SDK 中的下列 API: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