Decrypt Use Examples
Using Decrypt Service in User Authentication Process
This process is used to validate users to log them in. When Users enter their user Id and Password, we retrieve the same from the database. Passwords should always be stored in encrypted formats. In this example, we decrypt the password and match it the password field on webpage to validate the user.
Here’s a closer look at the inputs of Decrypt service. “Text” is the text we would like to decrypt. “Password” is the decryption key. Note that decryption key should match the one used while encrypting the text.
In the output logs we can see decrypted text.
Decrypt Service With Wrong Key
In this example we are encrypting “TEST” and trying to decrypt the same, but notice that while encrypting we haven’t used any encryption key and in the “Decrypt” service we are using “1234” as decryption key.
We get a decrypt exception if the key doesn’t match encryption key.