[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Formats/Keys/ -> PuTTY.php (summary)

PuTTY Formatted Key Handler See PuTTY's SSHPUBK.C and https://tartarus.org/~simon/putty-snapshots/htmldoc/AppendixC.html

Author: Jim Wigginton
Copyright: 2016 Jim Wigginton
License: http://www.opensource.org/licenses/mit-license.html MIT License
Link: http://phpseclib.sourceforge.net
File Size: 374 lines (13 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 7 functions

  setComment()
  setVersion()
  generateV2Key()
  generateV3Key()
  load()
  wrapPrivateKey()
  wrapPublicKey()

Functions
Functions that are not part of a class:

setComment($comment)   X-Ref
Sets the default comment

param: string $comment

setVersion($version)   X-Ref
Sets the default version

param: int $version

generateV2Key($password, $length)   X-Ref
Generate a symmetric key for PuTTY v2 keys

param: string $password
param: int $length
return: string

generateV3Key($password, $flavour, $memory, $passes, $salt)   X-Ref
Generate a symmetric key for PuTTY v3 keys

param: string $password
param: string $flavour
param: int $memory
param: int $passes
param: string $salt
return: array

load($key, $password)   X-Ref
Break a public or private key down into its constituent components

param: string $key
param: string $password
return: array

wrapPrivateKey($public, $private, $type, $password, array $options = [])   X-Ref
Wrap a private key appropriately

param: string $public
param: string $private
param: string $type
param: string $password
param: array $options optional
return: string

wrapPublicKey($key, $type)   X-Ref
Wrap a public key appropriately

This is basically the format described in RFC 4716 (https://tools.ietf.org/html/rfc4716)

param: string $key
param: string $type
return: string