ProcessMIX Guide
  • Platform Overview
    • Introduction
    • Platform Purpose
    • Main Concepts
      • Organization Structure
      • Visual Language
      • Project Development Environment (IDE)
      • Deployment and Integration
      • Administration and Troubleshooting
    • First Steps
    • Change Log
      • 5.0.0
      • 5.0.5
      • 5.0.5.1
      • 5.0.5.2
      • 5.0.5.3
      • 5.0.5.4
  • Language Reference Guide
    • Overview
    • Data Structures and Types
      • Core Types (pdk.core)
      • Dictionary (pdk.asset.dictionary)
      • Scorecard (pdk.asset.scorecard)
      • Blockchain (pdk.blockchain)
      • Exceptions (pdk.ex)
      • Input/Output (pdk.io)
      • JSON Web Token (pdk.jwt)
      • Networking (pdk.net)
      • HTTP (pdk.net.http)
      • SOAP/Web Services (pdk.net.soap)
      • XML/DOM (pdk.net.xml)
      • S3 (pdk.s3)
      • SQL (pdk.sql)
      • Postgres (pdk.db.postgre)
      • Util (pdk.util)
      • Default Data Structure Field Values
    • Flows
      • Variables
        • Local Flow Variables
        • Node Variables
      • Flow Node Types
        • Core Nodes
          • In
          • Out
          • Assign
          • If
          • Switch
          • Iterator
          • Function Call
          • Subflow
          • Raise Exception
          • Exception Handler
          • Validator
        • Connector Nodes
          • Database Begin Transaction
          • Database Commit Transaction
          • Database Rollback Transaction
          • Database Query Executor
          • EVM Blockchain Functions
          • EVM Blockchain Smart Contract Functions
          • REST Service Executor
          • SOAP Service Executor
          • S3 Connector
          • SMB Connector
      • Expressions
      • Built-In Functions
        • Expression functions
          • pdk.util.Any
          • pdk.util.Array
          • pdk.util.Blockchain
          • pdk.util.Cast
          • pdk.util.Codec
          • pdk.util.Crypto
          • pdk.util.Date
          • pdk.util.File
          • pdk.util.Json
          • pdk.util.JWT
          • pdk.util.Map
          • pdk.util.Math
          • pdk.util.String
          • pdk.util.Util
        • Node functions
          • pdk.flow.Any
          • pdk.flow.Array
          • pdk.flow.File
          • pdk.flow.JsonArray
          • pdk.flow.JsonObject
          • pdk.flow.HttpRequest
          • pdk.flow.HttpResponse
          • pdk.flow.Logger
          • pdk.flow.Map
          • pdk.flow.Xml
            • pdk.flow.xml.XmlAttr
            • pdk.flow.xml.XmlElement
            • pdk.flow.xml.XmlNode
            • pdk.flow.xml.XmlDocument
            • pdk.flow.xml.XmlDocumentType
            • pdk.flow.xml.XmlDOMConfiguration
            • pdk.flow.xml.XmlDOMImplementation
            • pdk.flow.xml.XmlProcessingInstruction
            • pdk.flow.xml.XmlTypeInfo
            • pdk.flow.xml.XmlCharacterData
            • pdk.flow.xml.XmlText
            • pdk.flow.xml.XmlNamedNodeMap
          • pdk.node.BlockchainEth
          • pdk.node.S3
          • pdk.node.Smb
      • Exceptions
        • Checked Exceptions
        • Runtime Exceptions
    • Assets
      • Dictionary
      • Decision Table
      • Scorecard
      • PMML
    • Connectors
      • DB Connector
        • Prepared Query
        • Dynamic Query
        • Query input parameters
        • Stored Procedure
      • REST Connector
      • SOAP Connector
      • S3 Connector
      • SMB Connector
      • EVM Blockchain Connector
    • Global Variables
    • Appendices
      • Overview of Database Transactions
      • Reserved Words
  • Project Development Environment (IDE)
    • Project Explorer Panel
    • Flow Builder
    • Flow Node Editor
    • Data Structure Builder
    • Connector Builders
      • REST Connector Builder
      • SOAP Connector Builder
      • DB (Database) Connector Builder
      • EVM Blockchain Connectors Builder
      • S3 Connector Builder
    • Asset Builders
      • Dictionary Builder
      • Decision Table Builder
      • Scorecard Builder
      • PMML Asset Builder
    • Global Variables Panel
    • Expression Editor
    • Project Deployment and Execution
    • Cron Expression Generator
    • Test Helper
    • Debugging the Project
    • DB transactions
    • Team Collaboration Tools
      • Version Control
      • Conflict Resolver
    • Selectors
    • Error Panel
    • Local History
  • Home and Administration Guide
    • Organization and Subscription
    • Organization Team
    • Repositories and Projects
    • Environments
    • Deployments
    • Database Provisioning
    • Roles and Permissions
  • Logs and Troubleshooting
    • Request/Call Logs
    • Deployment Logs
    • Application Logs
  • Appendix: Example Project
    • Risk Mitigation Solution
Powered by GitBook
On this page
  • Functions
  • encode
  • match
  • encryptAES256GCM
  • decryptAES256GCM
  1. Language Reference Guide
  2. Flows
  3. Built-In Functions
  4. Expression functions

pdk.util.Crypto

functions to encrypt/decrypt data

Previouspdk.util.CodecNextpdk.util.Date

Last updated 20 days ago

Functions


encode

Encode the raw string. Generally, a good encoding algorithm applies a SHA-1 or greater hash combined with an 8-byte or greater randomly generated salt.

Arguments:

  • cleanString ::

Result:

  • output :: - encoded string

Possible exceptions

  • - throws if the cleanString argument is NULL


match

Verify the encoded string matches the submitted clean string after it too is encoded. Returns true if the strings match, false if they do not. The encoded string itself is never decoded.

Arguments:

Result:

Possible exceptions


encryptAES256GCM

Encrypts a UTF-8 string using AES-256 in GCM mode with no padding.

The key is provided as a Base64-encoded string, and a new random 12-byte IV is generated for each encryption.

The result is a Base64-encoded string containing the IV concatenated with the ciphertext and authentication tag.

Parameters

Returns

Possible Exceptions


decryptAES256GCM

Decrypts a Base64-encoded string that was encrypted using AES-256 in GCM mode. It expects the input to contain the IV (first 12 bytes) followed by the ciphertext and authentication tag.

The key must be the same as the one used during encryption, also provided in Base64 format.

Parameters

Returns

Possible Exceptions

cleanString ::

encodedString :: - encoded by function

output :: - true if the clean string, after encoding, matches the encoded string.

- throws if the cleanString or the encodedString argument is NULL

plaintextUtf8 :: - UTF-8 string

base64Key :: - Base64-encoded key.

output :: - Base64-encoded encrypted string.

- throws if the plaintextUtf8 or the base64Key argument is NULL

base64Ciphertext :: - Base64-encoded string

base64Key :: - Base64-encoded key.

output :: - UTF-8 decrypted string.

- throws if the base64Ciphertext or the base64Key argument is NULL

encode
match
encryptAES256GCM
decryptAES256GCM
pdk.core.String
pdk.core.String
NullPointerException
pdk.core.String
pdk.core.String
pdk.util.Crypto.encode
pdk.core.Boolean
NullPointerException
pdk.core.String
pdk.core.String
pdk.core.String
NullPointerException
pdk.core.String
pdk.core.String
pdk.core.String
NullPointerException