SlideShare a Scribd company logo
DW Crypto in Mule4
Introduction
• MuleSoft provides multiple functions to encode the Dataweave
Transformation fields.
• This can be achieved using different kind of algorithms like MD5,
SHA1, hashwith, HMAC Binary and so on.
• To use the crypto module in Dataweave, you should import the
Crypto Module in Dataweave as below:
Import dw:Crypto
Introduction
Functions
Function Name Description
MD5 Computes the MD5 hash and transforms the binary result into a hexadecimal
lower case string.
SHA1 Computes the SHA1 hash and transforms the result into a hexadecimal,
lowercase string.
hashwith Computes the hash value of binary content using a specified algorithm.
HMACBinary Computes an HMAC hash (with a secret cryptographic key) on input content.
HMACWith Computes an HMAC hash (with a secret cryptographic key) on input content,
then transforms the result into a lowercase, hexadecimal string.
MD5 Crypto
• It Computes the MD5 hash and transforms the binary result into a
hexadecimal lower-case string.
Required Params Description
Content Input Data or content in Binary format.
MD5 - Example
MD5 - Example
SHA1
• It Computes the SHA1 hash and transforms the result into a
hexadecimal, lowercase string.
Required Params Description
Content A Binary input value to encrypt.
SHA1 - Example
SHA1 - Example
hashwith
• It Computes the hash value of binary content using a specified
algorithm.
• The first argument specifies the binary content to use to calculate the
hash value, and the second argument specifies the hashing algorithm
to use.
• The second argument must be any of the accepted Algorithm names:
hashwith
Algorithm names Description
MD2 The MD2 message digest algorithm as defined in RFC 1319.
MD5 The MD5 message digest algorithm as defined in RFC 1321.
SHA-1, SHA-256, SHA-384, SHA-512 Hash algorithms defined in the FIPS PUB 180-2.
SHA-256 is a 256-bit hash function intended to provide 128 bits
of security against collision attacks, while SHA-512 is a 512-bit
hash function intended to provide 256 bits of security. A 384-bit
hash may be obtained by truncating the SHA-512 output.
Parameters
hashwith
Required Params Description
Content The binary input content to hash.
Algorithm The name of the algorithm to use to calculate the hash value
of content. This value is a String. Defaults to SHA-1.
hashwith - Example
hashwith - Example
HMACBinary
• It Computes an HMAC hash (with a secret cryptographic key) on input
content.
Required Params Description
Secret The secret cryptographic key (a Binary) used when encrypting
the content).
Content The input content, a Binary value.
Algorithm The hashing algorithm. HmacSHA1 is the default.
Valid values depend on the JDK version you are using. For JDK 8
and JDK 11, HmacMD5, HmacSHA1, HmacSHA224, HmacSHA256,
HmacSHA384, and HmacSHA512 are valid algorithms.
For JDK 11, HmacSHA512/224 and HmacSHA512/256 are also
valid.
HMACBinary - Example
HMACBinary - Example
HMACWith
• It Computes an HMAC hash (with a secret cryptographic key) on input
content, then transforms the result into a lowercase, hexadecimal
string.
Required Params Description
secret The secret cryptographic key (a Binary) used when encrypting
the content).
content The input content, a Binary value.
algorithm By default, HmacSHA1 is used. Other valid values
are HmacSHA256 and HmacSHA512.
HMACWith
HMACWith
References
• https://docs.mulesoft.com/mule-runtime/4.3/dw-crypto
Dataweave Cryptography - Mulesoft

More Related Content

PDF
XXE Exposed: SQLi, XSS, XXE and XEE against Web Services
PDF
A Hacker's perspective on AEM applications security
PPTX
XSS Attacks Exploiting XSS Filter by Masato Kinugawa - CODE BLUE 2015
PDF
X-XSS-Nightmare: 1; mode=attack XSS Attacks Exploiting XSS Filter
PPTX
経路誘導のための交差点形状入力法
PDF
How to Become a Successful Remote SEO Consultant #LisbonSEOMeetup
PDF
diapositivas felcv.pdf
PDF
Lie to Me: Bypassing Modern Web Application Firewalls
XXE Exposed: SQLi, XSS, XXE and XEE against Web Services
A Hacker's perspective on AEM applications security
XSS Attacks Exploiting XSS Filter by Masato Kinugawa - CODE BLUE 2015
X-XSS-Nightmare: 1; mode=attack XSS Attacks Exploiting XSS Filter
経路誘導のための交差点形状入力法
How to Become a Successful Remote SEO Consultant #LisbonSEOMeetup
diapositivas felcv.pdf
Lie to Me: Bypassing Modern Web Application Firewalls

What's hot (19)

PDF
Hunting for security bugs in AEM webapps
PPTX
SEO Strategy: Where The F**K Do I Even Start? by Sophie Brannon
PDF
Build Your Own Website A Comic Guide to HTML, CSS and Wordpress (Nate Cooper)...
PDF
Hreflang: 
Is it really still necessary and 
how to use it successfully in 2023
PDF
SSRF workshop
PDF
How to quickly make flashcards
PDF
The Secret Life of a Bug Bounty Hunter – Frans Rosén @ Security Fest 2016
PPTX
Responsabilidad personal y profesional
PPTX
We’ve analysed the SEO of over 100 eCom sites - this is what we’ve learned!
PPTX
OWASP Risk Rating Methodology.pptx
PPTX
Secure Coding 101 - OWASP University of Ottawa Workshop
PDF
Marketing (myanmar version)
PDF
Mikhail Egorov - Hunting for bugs in Adobe Experience Manager webapps
PDF
AEM Sightly Template Language
PPTX
Angular interview questions
PPTX
HTL(Sightly) - All you need to know
PDF
An Overview of Deserialization Vulnerabilities in the Java Virtual Machine (J...
PDF
Ali - The Journey-Hack Electron App Desktop (MacOS).pdf
PPTX
Rest API with Swagger and NodeJS
Hunting for security bugs in AEM webapps
SEO Strategy: Where The F**K Do I Even Start? by Sophie Brannon
Build Your Own Website A Comic Guide to HTML, CSS and Wordpress (Nate Cooper)...
Hreflang: 
Is it really still necessary and 
how to use it successfully in 2023
SSRF workshop
How to quickly make flashcards
The Secret Life of a Bug Bounty Hunter – Frans Rosén @ Security Fest 2016
Responsabilidad personal y profesional
We’ve analysed the SEO of over 100 eCom sites - this is what we’ve learned!
OWASP Risk Rating Methodology.pptx
Secure Coding 101 - OWASP University of Ottawa Workshop
Marketing (myanmar version)
Mikhail Egorov - Hunting for bugs in Adobe Experience Manager webapps
AEM Sightly Template Language
Angular interview questions
HTL(Sightly) - All you need to know
An Overview of Deserialization Vulnerabilities in the Java Virtual Machine (J...
Ali - The Journey-Hack Electron App Desktop (MacOS).pdf
Rest API with Swagger and NodeJS
Ad

Similar to Dataweave Cryptography - Mulesoft (20)

PPTX
Message Digest message digest ppttsx.pptx
PPTX
Network Security Unit-2 topic Part-2.pptx
PPT
An Introduction to Hashing: A basic understanding
PPTX
cryptography and network security cns.pptx
PPTX
Hash Techniques in Cryptography
PPT
Hash Function & Analysis
PDF
Unit 3_Secure Hash Algorithm_SHA_Working.pdf
PPTX
Secure Hashing Techniques - Introduction
PPTX
Cryptography-Hash-Functions.pptx
PDF
Unit-3.pdf
PDF
Encryption: It's For More Than Just Passwords
PDF
cryptography summary hash function slides
PPTX
IS413 Topic 5.pptx
PPT
Hash mac algorithms
PPT
Hash mac algorithms
PPT
Hash mac algorithms
PPT
Hash mac algorithms
PPT
Hash& mac algorithms
PPT
Hash mac algorithms
PPT
Hash mac algorithms
Message Digest message digest ppttsx.pptx
Network Security Unit-2 topic Part-2.pptx
An Introduction to Hashing: A basic understanding
cryptography and network security cns.pptx
Hash Techniques in Cryptography
Hash Function & Analysis
Unit 3_Secure Hash Algorithm_SHA_Working.pdf
Secure Hashing Techniques - Introduction
Cryptography-Hash-Functions.pptx
Unit-3.pdf
Encryption: It's For More Than Just Passwords
cryptography summary hash function slides
IS413 Topic 5.pptx
Hash mac algorithms
Hash mac algorithms
Hash mac algorithms
Hash mac algorithms
Hash& mac algorithms
Hash mac algorithms
Hash mac algorithms
Ad

Recently uploaded (20)

PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Approach and Philosophy of On baking technology
PPT
Teaching material agriculture food technology
PDF
Encapsulation theory and applications.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
MYSQL Presentation for SQL database connectivity
PDF
KodekX | Application Modernization Development
PDF
cuic standard and advanced reporting.pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Big Data Technologies - Introduction.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Approach and Philosophy of On baking technology
Teaching material agriculture food technology
Encapsulation theory and applications.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Reach Out and Touch Someone: Haptics and Empathic Computing
MYSQL Presentation for SQL database connectivity
KodekX | Application Modernization Development
cuic standard and advanced reporting.pdf
Empathic Computing: Creating Shared Understanding
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
Chapter 3 Spatial Domain Image Processing.pdf
“AI and Expert System Decision Support & Business Intelligence Systems”
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Big Data Technologies - Introduction.pptx

Dataweave Cryptography - Mulesoft

  • 1. DW Crypto in Mule4
  • 2. Introduction • MuleSoft provides multiple functions to encode the Dataweave Transformation fields. • This can be achieved using different kind of algorithms like MD5, SHA1, hashwith, HMAC Binary and so on.
  • 3. • To use the crypto module in Dataweave, you should import the Crypto Module in Dataweave as below: Import dw:Crypto Introduction
  • 4. Functions Function Name Description MD5 Computes the MD5 hash and transforms the binary result into a hexadecimal lower case string. SHA1 Computes the SHA1 hash and transforms the result into a hexadecimal, lowercase string. hashwith Computes the hash value of binary content using a specified algorithm. HMACBinary Computes an HMAC hash (with a secret cryptographic key) on input content. HMACWith Computes an HMAC hash (with a secret cryptographic key) on input content, then transforms the result into a lowercase, hexadecimal string.
  • 5. MD5 Crypto • It Computes the MD5 hash and transforms the binary result into a hexadecimal lower-case string. Required Params Description Content Input Data or content in Binary format.
  • 8. SHA1 • It Computes the SHA1 hash and transforms the result into a hexadecimal, lowercase string. Required Params Description Content A Binary input value to encrypt.
  • 11. hashwith • It Computes the hash value of binary content using a specified algorithm. • The first argument specifies the binary content to use to calculate the hash value, and the second argument specifies the hashing algorithm to use.
  • 12. • The second argument must be any of the accepted Algorithm names: hashwith Algorithm names Description MD2 The MD2 message digest algorithm as defined in RFC 1319. MD5 The MD5 message digest algorithm as defined in RFC 1321. SHA-1, SHA-256, SHA-384, SHA-512 Hash algorithms defined in the FIPS PUB 180-2. SHA-256 is a 256-bit hash function intended to provide 128 bits of security against collision attacks, while SHA-512 is a 512-bit hash function intended to provide 256 bits of security. A 384-bit hash may be obtained by truncating the SHA-512 output.
  • 13. Parameters hashwith Required Params Description Content The binary input content to hash. Algorithm The name of the algorithm to use to calculate the hash value of content. This value is a String. Defaults to SHA-1.
  • 16. HMACBinary • It Computes an HMAC hash (with a secret cryptographic key) on input content. Required Params Description Secret The secret cryptographic key (a Binary) used when encrypting the content). Content The input content, a Binary value. Algorithm The hashing algorithm. HmacSHA1 is the default. Valid values depend on the JDK version you are using. For JDK 8 and JDK 11, HmacMD5, HmacSHA1, HmacSHA224, HmacSHA256, HmacSHA384, and HmacSHA512 are valid algorithms. For JDK 11, HmacSHA512/224 and HmacSHA512/256 are also valid.
  • 19. HMACWith • It Computes an HMAC hash (with a secret cryptographic key) on input content, then transforms the result into a lowercase, hexadecimal string. Required Params Description secret The secret cryptographic key (a Binary) used when encrypting the content). content The input content, a Binary value. algorithm By default, HmacSHA1 is used. Other valid values are HmacSHA256 and HmacSHA512.