function

genkey . crypto . sncode

VERSIONlatest Generate a private and public key for asymetric cryptography

GENKEY

NAME

genkey - Generate a private and public key for asymetric cryptography

SYNOPSIS

genkey([algo:"rsa|elg",bits:1024])

PARAMETERS

algo
Algorythm to be used.
bits
Number of bits for the keys. This is always required to specify the length of the key. The value should be a multiple of 8. 

RETURN

Hash
Returns a public and a private key

EXAMPLES

Note: In the followings examples, the _ between the { should be removed to make it work.

 keys = genkey(); keys.public; keys.private;

AUTHOR

Written by Pierre Laplante, <laplante@sednove.com>