EnDeCode.Encode

EnDeCode.Encode($string)
This method encodes a string, returns a string encoded.

Parameters
Name Summary
$string plain text


Returns
a string encoded.

ex)
# new instance
$encoder = new EnDecode;
# initialize with key string
$encoder = $encoder.Initialize("abcde");
# encode
$encodedstring = $encoder.Encode("P@ssw0rd!");
# new instance for decoding
$decoder = new EnDecode;
# initialize with incorrect key string
$decoder = $decoder.Initialize("asdf");
# fail to decode
$decoder.Decode($encodedstring);
# initialize with correct key string
$decoder = $decoder.Initialize("abcde");
# succeed to decode
$decoder.Decode($encodedstring);

Last edited Mar 2, 2013 at 11:53 AM by Tom__S, version 2

Comments

No comments yet.