PHP Class phpseclib\Crypt\RSA\PuTTY

Author: Jim Wigginton ([email protected])
Datei anzeigen Open project: phpseclib/phpseclib Class Usage Examples

Public Properties

Property Type Description
$comment string Default comment

Public Methods

Method Description
generateSymmetricKey ( string $password, integer $length ) : string Generate a symmetric key for PuTTY keys
load ( string $key, string $password = '' ) : array Break a public or private key down into its constituent components
savePrivateKey ( phpseclib\Math\BigInteger $n, phpseclib\Math\BigInteger $e, phpseclib\Math\BigInteger $d, array $primes, array $exponents, array $coefficients, string $password = '' ) : string Convert a private key to the appropriate format.
savePublicKey ( phpseclib\Math\BigInteger $n, phpseclib\Math\BigInteger $e ) : string Convert a public key to the appropriate format
setComment ( string $comment ) Sets the default comment

Method Details

generateSymmetricKey() static public method

Generate a symmetric key for PuTTY keys
static public generateSymmetricKey ( string $password, integer $length ) : string
$password string
$length integer
return string

load() static public method

Break a public or private key down into its constituent components
static public load ( string $key, string $password = '' ) : array
$key string
$password string optional
return array

savePrivateKey() static public method

Convert a private key to the appropriate format.
static public savePrivateKey ( phpseclib\Math\BigInteger $n, phpseclib\Math\BigInteger $e, phpseclib\Math\BigInteger $d, array $primes, array $exponents, array $coefficients, string $password = '' ) : string
$n phpseclib\Math\BigInteger
$e phpseclib\Math\BigInteger
$d phpseclib\Math\BigInteger
$primes array
$exponents array
$coefficients array
$password string optional
return string

savePublicKey() static public method

Convert a public key to the appropriate format
static public savePublicKey ( phpseclib\Math\BigInteger $n, phpseclib\Math\BigInteger $e ) : string
$n phpseclib\Math\BigInteger
$e phpseclib\Math\BigInteger
return string

setComment() static public method

Sets the default comment
static public setComment ( string $comment )
$comment string

Property Details

$comment static_oe public_oe property

Default comment
static public string $comment
return string