Send feedback
Stay organized with collections
Save and categorize content based on your preferences.
Preview
— Data Transformer Script task
This feature is subject to the "Pre-GA Offerings Terms" in the General Service Terms section
of the Service Specific Terms .
Pre-GA features are available "as is" and might have limited support.
For more information, see the
launch stage descriptions .
Hash functions
This page describes the additional set of predefined Jsonnet functions for the Data Transformer Script task available in Application Integration.
Before you begin
To use the following predefined functions, you must import the functions
library in your script. Importing the functions
library lets you use both the standard Jsonnet functions and the predefined Data Transformer functions.
Application Integration supports Jsonnet functions library v0.20.0. For information about the Jsonnet standard functions, see Jsonnet Standard Library .
SHA1
Syntax
sha1(str)
Description
Computes the cryptographic hash of the input STRING
using the Secure Hash Algorithm 1 (SHA-1) algorithm.
Warning: SHA1 is no longer considered secure. For increased security, use another hashing function.
Input parameter
str: The input string.
Return type
BYTES
Output
Returns a 160 bit (20-byte) hash value.
SHA256
Syntax
sha256(str)
Description
Computes the cryptographic hash of the input STRING
using the Secure Hash Algorithm 256 (SHA-256) algorithm.
Input parameter
str: The input string.
Return type
BYTES
Output
Returns a 256 bit (32-byte) hash value.
SHA512
Syntax
sha512(str)
Description
Computes the cryptographic hash of the input STRING
using the Secure Hash Algorithm 512 (SHA-512) algorithm.
Input parameter
str: The input string.
Return type
BYTES
Output
Returns a 512 bit (64-byte) hash value.
SHA3
Syntax
sha3(str)
Description
Computes the cryptographic hash of the input STRING
using the Secure Hash Algorithm 3 (SHA-3) algorithm.
Input parameter
str: The input string.
Return type
BYTES
Output
Returns a 512 bit (64-byte) hash value.
Recommendation
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-27 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?
{"lastModified": "Last updated 2024-09-27 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-09-27 UTC."]]