"Sputnik" help  
Sputnik Help
EncCreateKey

Description

 

Parameters

   

Return Value

Success: Returns true.
Failure: Returns false.

Remarks

 

Related

Example

Example of usage:

// create public/private key
my $key = EncCreateKey(1024);

// generate pass to use for encryption session
my $pass = EncCreatePass();

// data to encrypt
my $data = "The quick brown fox jumps over the lazy dog";

// encrypt the data and print it
my $encData = EncryptSerpent($pass, $data);
say BinaryExpand($encData);

// encrypt the password using the public key
my $passEncrypted = EncryptPass($key, $pass);
unset($pass); // delete key just to prove we can recover it

// decrypt the password using the private key
my $pass = DecryptPass($key, $passEncrypted);

// decrypt the data using the pass and print it
my $decData = DecryptSerpent($pass, $encData);
say $decData;

// PRINTS
// 00 | DD AB 6A 53 A5 80 B2 0A 93 EA BB 6A 79 1B EC CF Ý«jS¥....ê»jy.ìÏ
// 01 | 1E 80 CF 4F 57 7A D6 EA AE 0D 08 B6 4A 29 60 64 ..ÏOWzÖê®..¶J)`d
// 02 | 65 EB A8 03 77 C7 05 AA 38 AA 0C 87 79 2F 25 0B eë¨.wÇ.ª8ª..y/%.
// The quick brown fox jumps over the lazy dog

 


Contact
Cheryl (uberfox@hotmail.com)
Homepage
http://ubersoft.org