Package com.thingworx.resources.admin
Class EncryptionServices
- All Implemented Interfaces:
IConfigurableObject
,INotScriptFriendly
,ISupportsDeprecation
,IDiffableObject
,IAvatar
,IEntityLifeCycleEvent
,IPersistable
,IServiceProvider
,ITaggableObject
,IDependencyScannableObject
,IEntityDefinition
,IPersistableObject<String>
,IDesignTimeSecurable
,IDesignTimeSecurableEntity
,IRunTimeSecurable
,IRunTimeSecurableEntity
,ISecurable
,IVisibilitySecurable
,IVisibilitySecurableEntity
,IAspectContainer
,INamedObject
,Serializable
@ThingworxExtensionApiClass(since={6,6},
canInstantiate=true)
public class EncryptionServices
extends Resource
- See Also:
-
Field Summary
Fields inherited from class com.thingworx.entities.RootEntity
BASIC_PROPERTY_DEFINITIONS, EXCLUDED_ENTITY_TYPES_IN_PROJECT
Fields inherited from class com.thingworx.types.NamedObject
NAME_COMPARATOR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionDecryptWithCustomKey
(String key, String encryptedData) Service Category: Encryption Service Description: Returns decrypted data using the Base64 encoded key with valid sizes; 128, 192 or 256 bits.DecryptWithKey
(String key, String data) Deprecated.Service Category: Encryption Service Description: Returns an encrypted password.EncryptPropertyValue
(String data) Service Category: Encryption Service Description: Returns an encrypted property value.EncryptWithCustomKey
(String key, String data) Service Category: Encryption Service Description: Returns an encrypted string using a Base64 encoded key with AES 128 supported key lengths; 128, 192 or 256 bits.EncryptWithKey
(String key, String data) Deprecated.UseEncryptWithCustomKey(String, String)
instead.GenerateKey
(Integer size) Service Category: Encryption Service Description: Returns a Base64 encoded AES encryption key.Methods inherited from class com.thingworx.resources.Resource
getEntityType
Methods inherited from class com.thingworx.entities.ServiceProviderEntity
getInstancePublicServiceDefinitions, getInstanceServiceDefinition, getInstanceServiceDefinitions, initializeEntity, preInitializeEntity, processAPIServiceRequest, processServiceRequest
Methods inherited from class com.thingworx.entities.RootEntity
AddConfigurationTableDefinition, AddConfigurationTableDefinition, addDesignTimePermission, AddDesignTimePermission, addRunTimePermission, AddRunTimePermission, AddTags, addVisibilityPermission, AddVisibilityPermission, CheckDesignTimePermission, CheckDesignTimePermissionForGroup, CheckDesignTimePermissionForUser, CheckPermission, CheckPermissionForGroup, CheckPermissionForUser, cleanupEntity, DeleteAllConfigurationTableRows, DeleteConfigurationTable, DeleteConfigurationTableRows, DeleteConfigurationTableRows, deleteDesignTimePermission, DeleteDesignTimePermission, deleteRunTimePermission, DeleteRunTimePermission, deleteVisibilityPermission, DeleteVisibilityPermission, dispose, getAspects, GetAvatar, getAvatarContent, GetAvatarURL, GetConfigurationChangeHistory, getConfigurationSetting, getConfigurationTable, GetConfigurationTable, GetConfigurationTableDefinition, GetConfigurationTableRow, GetConfigurationTables, GetDescription, getDesignTimePermissions, GetDesignTimePermissions, GetDesignTimePermissionsAsJSON, getDocumentationContent, getEntityTypeAsString, GetEventDefinition, GetEventDefinitions, GetHomeMashup, GetIncomingDependencies, GetIncomingDependenciesAsNetwork, GetInstanceMetadataAsJSON, GetInstanceMetadataWithPermissionsAsJSON, GetLastModifiedDate, GetMetadata, GetMetadataAsJSON, GetMetadataWithPermissionsAsJSON, GetOutgoingDependencies, GetOutgoingDependenciesAsNetwork, getOwner, GetOwner, GetPermissionsForCurrentUser, GetPermissionsForGroup, GetPermissionsForUser, GetProjectName, GetPropertyDefinition, GetPropertyDefinitions, getRunTimePermissions, GetRunTimePermissions, GetRunTimePermissionsAsJSON, GetServiceDefinition, GetServiceDefinitions, getStringConfigurationSetting, getStringConfigurationSettingWithDefault, GetSummaryInformation, getTags, GetTags, GetTagsAsInfoTable, getVisibilityPermissions, GetVisibilityPermissions, GetVisibilityPermissionsAsJSON, HasIncomingDependencies, HasOutgoingDependencies, isEditable, isEditableExtensionObject, isEditableSystemObject, isExtensionObject, IsMultiRowTable, isOwner, isSystemObject, isThemeObject, isVisible, isVisible, ListDeprecatedUsage, persistDesignTimePermissions, persistRunTimePermissions, persistVisibilityPermissions, RemoveTags, SaveConfigurationTables, SetAvatar, setConfigurationSetting, SetConfigurationTable, SetConfigurationTableRows, SetDescription, setDesignTimePermissions, SetDesignTimePermissionsAsJSON, setDocumentationContent, setExtensionObject, SetHomeMashup, setLastModifiedDate, SetMultiRowConfigurationTable, setOwner, SetOwner, SetProjectName, setRunTimePermissions, SetRunTimePermissionsAsJSON, setStringConfigurationSetting, SetTags, setVisibilityPermissions, SetVisibilityPermissionsAsJSON, toJSON, toJSONDefinition, UpdateProjectDependencies, validateConfiguration
Methods inherited from class com.thingworx.persistence.common.PersistableNamedObject
getID, hasID, isTransient
Methods inherited from class com.thingworx.types.NamedObject
getDescription, getName, setDescription, setName, toValueCollection
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.thingworx.types.INamedObject
getDescription, getName
Methods inherited from interface com.thingworx.entities.interfaces.IPersistable
getID, hasID
Methods inherited from interface com.thingworx.security.permissions.ISecurable
getID, getName
Methods inherited from interface com.thingworx.deprecation.ISupportsDeprecation
getDeprecated, isDeprecated, isDeprecatedBefore, since
-
Constructor Details
-
EncryptionServices
public EncryptionServices()
-
-
Method Details
-
Encrypt
- Service Category:
- Encryption
- Service Description:
- Returns an encrypted password.
- Parameters:
data
- Data to encrypt - STRING- Returns:
- result Encrypted data - STRING
- Throws:
Exception
- If an error occurs
-
EncryptPropertyValue
@ThingworxExtensionApiMethod(since={6,6}) public String EncryptPropertyValue(String data) throws Exception - Service Category:
- Encryption
- Service Description:
- Returns an encrypted property value.
- Parameters:
data
- Data to encrypt - STRING- Returns:
- result Encrypted data - STRING
- Throws:
Exception
- If an error occurs
-
EncryptWithKey
@Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={8,3}) public String EncryptWithKey(String key, String data) throws Exception Deprecated.UseEncryptWithCustomKey(String, String)
instead.- Service Category:
- Encryption
- Service Description:
- Returns an encrypted string using a specified key. This service is deprecated since release 8.3. Please use EncryptWithCustomKey service instead.
Returns an encrypted string using a specified key, which is a 56 hex characters string.- Parameters:
key
- Encryption key to use (56 hex characters)data
- Data to encrypt- Returns:
- Returns an encrypted string using a specified key
- Throws:
Exception
- emit errors
-
DecryptWithKey
@Deprecated @ThingworxExtensionApiMethod(since={6,6}, deprecatedSince={8,3}) public String DecryptWithKey(String key, String data) throws Exception Deprecated.UseDecryptWithCustomKey(String, String)
instead.- Service Category:
- Encryption
- Service Description:
- Returns an decrypted string using a specified key. This service is deprecated since release 8.3. Please use DecryptWithCustomKey service instead.
Returns an decrypted string using a specified key, which is a 56 hex characters string.- Parameters:
key
- Encryption key to use (56 hex characters)data
- Data to decrypt- Returns:
- Returns an decrypted string using a specified key
- Throws:
Exception
- emit errors
-
GenerateKey
- Service Category:
- Encryption
- Service Description:
- Returns a Base64 encoded AES encryption key. Supports AES key sizes, i.e. 128, 192 or 256 bits.
- Parameters:
size
- Size of the key to be generated in bits. Supported key sizes are 128, 192 and 256 bits - INTEGER- Returns:
- key Base64 encoded key - STRING
- Throws:
Exception
- If an error occurs
-
EncryptWithCustomKey
@ThingworxExtensionApiMethod(since={8,3}) public String EncryptWithCustomKey(String key, String data) throws Exception - Service Category:
- Encryption
- Service Description:
- Returns an encrypted string using a Base64 encoded key with AES 128 supported key lengths; 128, 192 or 256 bits.
- Parameters:
key
- Based64 encoded key with key size of 128, 192 or 256 bits - STRINGdata
- Plain text data to encrypt - STRING- Returns:
- result Encrypted data - STRING
- Throws:
Exception
- If an error occurs
-
DecryptWithCustomKey
@ThingworxExtensionApiMethod(since={8,3}) public String DecryptWithCustomKey(String key, String encryptedData) throws Exception - Service Category:
- Encryption
- Service Description:
- Returns decrypted data using the Base64 encoded key with valid sizes; 128, 192 or 256 bits.
- Parameters:
key
- Based64 encoded key with sizes of 128, 192 or 256 bits - STRINGencryptedData
- Data encrypted using Thingworx EncryptWithCustomKey service - STRING- Returns:
- result Decrypted data - STRING
- Throws:
Exception
- If an error occurs
-
DecryptWithCustomKey(String, String)
instead.