encrypt_cryptopan
Encrypts an IP address via Crypto-PAn.
Synopsis
Section titled “Synopsis”encrypt_cryptopan(address:ip, [seed=string])
Description
Section titled “Description”The encrypt_cryptopan
function encrypts the IP address
using the
Crypto-PAn algorithm.
address: ip
Section titled “address: ip”The IP address to encrypt.
seed = string (optional)
Section titled “seed = string (optional)”A 64-byte seed that describes a hexadecimal value. When the seed is shorter than 64 bytes, the function appends zeros to match the size; when it is longer, it truncates the seed.
Examples
Section titled “Examples”Encrypt IP address fields
Section titled “Encrypt IP address fields”let $seed = "deadbeef" // use secret() function in practicefrom { src: encrypt_cryptopan(114.13.11.35, seed=$seed), dst: encrypt_cryptopan(114.56.11.200, seed=$seed),}
{ src: 117.179.11.60, dst: 117.135.244.180,}