[ Index ]

PHP Cross Reference of DokuWiki

title

Body

[close]

/vendor/phpseclib/phpseclib/phpseclib/Crypt/Common/Traits/ -> PasswordProtected.php (summary)

Password Protected Trait for Private Keys PHP version 5

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

Defines 1 function

  withPassword()

Functions
Functions that are not part of a class:

withPassword($password = false)   X-Ref
Sets the password

Private keys can be encrypted with a password.  To unset the password, pass in the empty string or false.
Or rather, pass in $password such that empty($password) && !is_string($password) is true.

param: string|bool $password
see: self::createKey()
see: self::load()