Bundle Cryptographic utilities including AES-256 encryption/decryption, SHA-1/256/512 and MD5 hashing, HMAC signing, and Base64 encoding/decoding. Compile with -lib cipher.
Decrypt
Decrypts data
Operations
AES256 # function
Decrypts input using AES-256
function : AES256(key:Byte[], stream_in:Byte[]) ~ Byte[]Parameters
| Name | Type | Description |
|---|---|---|
| key | Byte | encryption key |
| stream_in | Byte | bytes to decrypted |
Return
| Type | Description |
|---|---|
| Byte | decrypted bytes |
Example
key := "mysecretkey123456789012345678901"->ToByteArray(); # 32 bytes
plain := "Hello World"->ToByteArray();
cipher := Cipher.Encrypt->AES256(key, plain);
result := Cipher.Decrypt->AES256(key, cipher); # recover original
result->ToString()->PrintLine();Base64 # native
Decrypts input using Base64
function : native : Base64(input:String) ~ Byte[]Parameters
| Name | Type | Description |
|---|---|---|
| input | String | input bytes to decrypted |
Return
| Type | Description |
|---|---|
| Byte | decrypted bytes |
Example
encoded := Cipher.Encrypt->Base64("Hello World"->ToByteArray());
decoded := Cipher.Decrypt->Base64(encoded); # decode from Base64
decoded->ToString()->PrintLine();