How is your experience with the OutSystems Community?
16
Views
1
Comments
Solved
how to create digest?
Question
Application Type
Reactive

hi there,

i want to create a digest where the code ini php is like this:


// 1. Data JSON yang akan dikirim (dalam format string)

 $requestBody = '{

    "order": {

        "amount": 10000,

        "invoice_number": "INV-001"

    },

    "customer": {

        "name": "Budi"

    }

}';


// 2. Hash dengan SHA-256

// True di parameter kedua mengembalikan data binary raw, bukan hex string

 $digestRaw = hash('sha256', $requestBody, true);


// 3. Encode ke Base64

 $digest = base64_encode($digestRaw);


echo $digest; 

// Output akan seperti: +VUz0... (panjang karakter acak)

?>

How can i achieve the same result using Outsystems?

thanks

2026-01-28 16-57-48
Mihai Melencu
Champion
Solution

Hi,

You can achieve the same result by generating a SHA-256 hash.

In PHP, this part is important:

hash('sha256', $requestBody, true)

The true parameter means the hash is returned as raw binary data, not as a hexadecimal string.

A good Forge component to check is CryptoAPI. 

You can use the ComputeHash action, which defaults to SHA-256 and provides the output in both Hex and Base64 formats. In your case, since the Base64 output is already available, you should not need to encode it to Base64 again.


Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.