Link | lp_var_pack |
Author | Bil Corry |
Category | Variable |
Version | 8.x |
License | Public Domain |
Posted | 02 Dec 2005 |
Updated | 07 Sep 2006 |
More by this author... |
Packs variables into compact, ASCII-safe bundles. Optionally can encrypt data.
Note: requires [lp_var_unpack] to unpack the variable.
''; var:'test' = (array: 1, 2, 3, 4, 5); $test; '';
'; ($test->serialize)->size; '
'; var:'pack' = (lp_var_pack: $test, 'secret'); $pack->size; '
'; var:'unpack' = (lp_var_unpack: $pack, 'secret'); $unpack; '
'; '
Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
[ define_tag:'lp_var_pack', -description='Packs variables into compact, ASCII-safe bundles. Optionally can encrypt data.', -priority='replace', -required='object_to_pack', -optional='password', -optional='encodehex', -optional='encodebase64', -optional='noencode'; if: (local_defined:'password'); local:'pack' = (encrypt_blowfish2:-seed=#password,(compress:(#object_to_pack->serialize))); else; local:'pack' = (compress:(#object_to_pack->serialize)); /if; if: (local_defined:'noencode'); return: #pack; else: (local_defined:'encodehex'); return: (encode_hex: #pack); else; // base64 return: (encode_base64: #pack); /if; /define_tag; ]
No comments
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft