[ 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

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

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

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

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

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

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

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

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)

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