Skip to content

Commit

Permalink
improve md
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeloffner committed Jun 6, 2024
1 parent 0577997 commit 1d5a28d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/recipes/encryption_decryption.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
]
}
-->
## Encryption/Decryption ##
# Encryption/Decryption

This document explains about Encryption/Decryption with public and private keys with simple examples.

Expand All @@ -31,7 +31,7 @@ Encryption/Decryption is a new functionality in Lucee 5.3. We have a new way to
* Private key to encrypt
* Public key to decrypt

### Example 1: ###
## Example 1:

```luceescript
//index.cfm
Expand All @@ -48,7 +48,7 @@ dump(key)

This function generates RSA keys. Execute the example code above in the browser and a struct is returned containing the two keys: a private key and a public key. So, we can create these keys, and store them somewhere for later use.

### Example 2: ###
## Example 2:

```luceescript
key=generateRSAKeys();
Expand All @@ -59,7 +59,7 @@ dump(enc);

We now create RSA keys using the [[function-generatersakeys]] function, and then use the key to encrypt using the [[function-encrypt]] function. The encrypt() function has some arguments. It has `key.private` which defines the key as the private key, and `rsa` indicates use of the RSA encryption algorithm. Then run the dump in the browser and we see the encrypted string for your input string.

### Example 3: ###
## Example 3:

```luceescript
key=generateRSAKeys();
Expand All @@ -71,7 +71,7 @@ dump(dec);

This is a full detailed example of encrypt/decrypt functions. We create a key and we encrypt with the private key. Then we [[function-decrypt]] with the public key. Then run the dump in the browser and we see the original string returned as expected.

### Footnotes ###
## Footnotes

Here you can see these details in the video also:

Expand Down

0 comments on commit 1d5a28d

Please sign in to comment.