Melang

Logo

A script language of preemptive scheduling coroutine in single thread

View the Project on GitHub Water-Melon/Melang

DES

This document includes DES and 3DES functions.

mln_des
@mln_des(data, key, op);

Input:

Return value:

Error:

Example:

text = 'DES test'; //length is 8
cipher = @mln_des(text, 100, 'encode');
@mln_print(cipher);
@mln_print(@mln_des(cipher, 100, 'decode'));

The output is:

4xF???Q
DES test
mln_3des
@mln_3des(data, key1, key2, op);

Input:

Return value:

Error:

Example:

text = 'DES test'; //length is 8
cipher = @mln_3des(text, 100, 99, 'encode');
@mln_print(cipher);
@mln_print(@mln_3des(cipher, 100, 99, 'decode'));

The output is:

t?M??*?
DES test