ePages 6.10 - DE_EPAGES/Core/API/Scramble.pm

Package DE_EPAGES::Core::API::Scramble

Includes simple scramble and unscrample functions for a string. The scrambled string is base64 encoded.

@EXPORT_OK
Scramble
Unscramble

Functions

Scramble
Unscramble

Scramble

Scrambles a string. The second argument is the line-ending sequence to use. It is optional and defaults to "\n". The returned encoded string is broken into lines of no more than 76 characters each and it will end with $eol unless it is empty. Pass an empty string as second argument if you do not want the encoded string to be broken into lines.

Syntax
$ScrambledString = Scramble( $String, $eol )
§exaple       $ScrambledString = Scramble( 'CREATE PROC ...' )
Input
$String (string)
string containing the text to crypt
$eol (string)
(optional, default: "\n") line ending
Return
$ScrambledString (string)
scrambled string

Unscramble

Unscrambles a string.

Syntax
$String = Unscramble( $ScrambledString );
Input
$ScrambledString (string)
scrambled string
Return
$String (string)
unscrambled string