Merge pull request #820 from GrahamForks/phpdoc

[2.0 Fixed phpdoc

* GrahamForks/phpdoc:
  Fixed phpdoc
This commit is contained in:
Andreas Fischer 2015-09-16 13:34:55 +02:00
commit 95ccad70ee
11 changed files with 81 additions and 104 deletions

View File

@ -64,7 +64,7 @@ class DES extends Base
const ENCRYPT = 0; const ENCRYPT = 0;
/** /**
* Contains $keys[self::DECRYPT] * Contains $keys[self::DECRYPT]
*/ */
const DECRYPT = 1; const DECRYPT = 1;
/**#@-*/ /**#@-*/

View File

@ -59,11 +59,11 @@ class Hash
const MODE_INTERNAL = 1; const MODE_INTERNAL = 1;
/** /**
* Toggles the mhash() implementation, which has been deprecated on PHP 5.3.0+. * Toggles the mhash() implementation, which has been deprecated on PHP 5.3.0+.
*/ */
const MODE_MHASH = 2; const MODE_MHASH = 2;
/** /**
* Toggles the hash() implementation, which works on PHP 5.1.2+. * Toggles the hash() implementation, which works on PHP 5.1.2+.
*/ */
const MODE_HASH = 3; const MODE_HASH = 3;
/**#@-*/ /**#@-*/

View File

@ -89,7 +89,7 @@ class RSA
* *
* Although self::ENCRYPTION_OAEP offers more security, including PKCS#1 padding is necessary for purposes of backwards * Although self::ENCRYPTION_OAEP offers more security, including PKCS#1 padding is necessary for purposes of backwards
* compatibility with protocols (like SSH-1) written before OAEP's introduction. * compatibility with protocols (like SSH-1) written before OAEP's introduction.
*/ */
const ENCRYPTION_PKCS1 = 2; const ENCRYPTION_PKCS1 = 2;
/** /**
* Do not use any padding * Do not use any padding
@ -113,14 +113,14 @@ class RSA
* *
* @see \phpseclib\Crypt\RSA::setSaltLength() * @see \phpseclib\Crypt\RSA::setSaltLength()
* @see \phpseclib\Crypt\RSA::setMGFHash() * @see \phpseclib\Crypt\RSA::setMGFHash()
*/ */
const SIGNATURE_PSS = 1; const SIGNATURE_PSS = 1;
/** /**
* Use the PKCS#1 scheme by default. * Use the PKCS#1 scheme by default.
* *
* Although self::SIGNATURE_PSS offers more security, including PKCS#1 signing is necessary for purposes of backwards * Although self::SIGNATURE_PSS offers more security, including PKCS#1 signing is necessary for purposes of backwards
* compatibility with protocols (like SSH-2) written before PSS's introduction. * compatibility with protocols (like SSH-2) written before PSS's introduction.
*/ */
const SIGNATURE_PKCS1 = 2; const SIGNATURE_PKCS1 = 2;
/**#@-*/ /**#@-*/
@ -130,23 +130,23 @@ class RSA
*/ */
/** /**
* ASN1 Integer * ASN1 Integer
*/ */
const ASN1_INTEGER = 2; const ASN1_INTEGER = 2;
/** /**
* ASN1 Bit String * ASN1 Bit String
*/ */
const ASN1_BITSTRING = 3; const ASN1_BITSTRING = 3;
/** /**
* ASN1 Octet String * ASN1 Octet String
*/ */
const ASN1_OCTETSTRING = 4; const ASN1_OCTETSTRING = 4;
/** /**
* ASN1 Object Identifier * ASN1 Object Identifier
*/ */
const ASN1_OBJECT = 6; const ASN1_OBJECT = 6;
/** /**
* ASN1 Sequence (with the constucted bit set) * ASN1 Sequence (with the constucted bit set)
*/ */
const ASN1_SEQUENCE = 48; const ASN1_SEQUENCE = 48;
/**#@-*/ /**#@-*/
@ -156,13 +156,13 @@ class RSA
*/ */
/** /**
* To use the pure-PHP implementation * To use the pure-PHP implementation
*/ */
const MODE_INTERNAL = 1; const MODE_INTERNAL = 1;
/** /**
* To use the OpenSSL library * To use the OpenSSL library
* *
* (if enabled; otherwise, the internal implementation will be used) * (if enabled; otherwise, the internal implementation will be used)
*/ */
const MODE_OPENSSL = 2; const MODE_OPENSSL = 2;
/**#@-*/ /**#@-*/
@ -175,19 +175,19 @@ class RSA
* PKCS#1 formatted private key * PKCS#1 formatted private key
* *
* Used by OpenSSH * Used by OpenSSH
*/ */
const PRIVATE_FORMAT_PKCS1 = 0; const PRIVATE_FORMAT_PKCS1 = 0;
/** /**
* PuTTY formatted private key * PuTTY formatted private key
*/ */
const PRIVATE_FORMAT_PUTTY = 1; const PRIVATE_FORMAT_PUTTY = 1;
/** /**
* XML formatted private key * XML formatted private key
*/ */
const PRIVATE_FORMAT_XML = 2; const PRIVATE_FORMAT_XML = 2;
/** /**
* PKCS#8 formatted private key * PKCS#8 formatted private key
*/ */
const PRIVATE_FORMAT_PKCS8 = 3; const PRIVATE_FORMAT_PKCS8 = 3;
/**#@-*/ /**#@-*/
@ -208,7 +208,7 @@ class RSA
* The modulus can be indexed with any of the following: * The modulus can be indexed with any of the following:
* *
* 1, n, modulo, modulus * 1, n, modulo, modulus
*/ */
const PUBLIC_FORMAT_RAW = 3; const PUBLIC_FORMAT_RAW = 3;
/** /**
* PKCS#1 formatted public key (raw) * PKCS#1 formatted public key (raw)
@ -220,18 +220,18 @@ class RSA
* -----BEGIN RSA PUBLIC KEY----- * -----BEGIN RSA PUBLIC KEY-----
* *
* Analogous to ssh-keygen's pem format (as specified by -m) * Analogous to ssh-keygen's pem format (as specified by -m)
*/ */
const PUBLIC_FORMAT_PKCS1 = 4; const PUBLIC_FORMAT_PKCS1 = 4;
const PUBLIC_FORMAT_PKCS1_RAW = 4; const PUBLIC_FORMAT_PKCS1_RAW = 4;
/** /**
* XML formatted public key * XML formatted public key
*/ */
const PUBLIC_FORMAT_XML = 5; const PUBLIC_FORMAT_XML = 5;
/** /**
* OpenSSH formatted public key * OpenSSH formatted public key
* *
* Place in $HOME/.ssh/authorized_keys * Place in $HOME/.ssh/authorized_keys
*/ */
const PUBLIC_FORMAT_OPENSSH = 6; const PUBLIC_FORMAT_OPENSSH = 6;
/** /**
* PKCS#1 formatted public key (encapsulated) * PKCS#1 formatted public key (encapsulated)
@ -245,7 +245,7 @@ class RSA
* Analogous to ssh-keygen's pkcs8 format (as specified by -m). Although PKCS8 * Analogous to ssh-keygen's pkcs8 format (as specified by -m). Although PKCS8
* is specific to private keys it's basically creating a DER-encoded wrapper * is specific to private keys it's basically creating a DER-encoded wrapper
* for keys. This just extends that same concept to public keys (much like ssh-keygen) * for keys. This just extends that same concept to public keys (much like ssh-keygen)
*/ */
const PUBLIC_FORMAT_PKCS8 = 7; const PUBLIC_FORMAT_PKCS8 = 7;
/**#@-*/ /**#@-*/

View File

@ -189,29 +189,6 @@ class Rijndael extends Base
*/ */
var $kl; var $kl;
/**
* Default Constructor.
*
* Determines whether or not the mcrypt extension should be used.
*
* $mode could be:
*
* - \phpseclib\Crypt\Base::MODE_ECB
*
* - \phpseclib\Crypt\Base::MODE_CBC
*
* - \phpseclib\Crypt\Base::MODE_CTR
*
* - \phpseclib\Crypt\Base::MODE_CFB
*
* - \phpseclib\Crypt\Base::MODE_OFB
*
* If not explictly set, \phpseclib\Crypt\Base::MODE_CBC will be used.
*
* @see \phpseclib\Crypt\Base::Crypt_Base()
* @param int $mode
* @access public
/** /**
* Sets the key. * Sets the key.
* *

View File

@ -60,7 +60,7 @@ class TripleDES extends DES
* Encrypt / decrypt using outer chaining * Encrypt / decrypt using outer chaining
* *
* Outer chaining is used by SSH-2 and when the mode is set to \phpseclib\Crypt\Base::MODE_CBC. * Outer chaining is used by SSH-2 and when the mode is set to \phpseclib\Crypt\Base::MODE_CBC.
*/ */
const MODE_CBC3 = Base::MODE_CBC; const MODE_CBC3 = Base::MODE_CBC;
/** /**

View File

@ -57,27 +57,27 @@ class X509
*/ */
/** /**
* Return internal array representation * Return internal array representation
*/ */
const DN_ARRAY = 0; const DN_ARRAY = 0;
/** /**
* Return string * Return string
*/ */
const DN_STRING = 1; const DN_STRING = 1;
/** /**
* Return ASN.1 name string * Return ASN.1 name string
*/ */
const DN_ASN1 = 2; const DN_ASN1 = 2;
/** /**
* Return OpenSSL compatible array * Return OpenSSL compatible array
*/ */
const DN_OPENSSL = 3; const DN_OPENSSL = 3;
/** /**
* Return canonical ASN.1 RDNs string * Return canonical ASN.1 RDNs string
*/ */
const DN_CANON = 4; const DN_CANON = 4;
/** /**
* Return name hash for file indexing * Return name hash for file indexing
*/ */
const DN_HASH = 5; const DN_HASH = 5;
/**#@-*/ /**#@-*/
@ -91,24 +91,24 @@ class X509
* Save as PEM * Save as PEM
* *
* ie. a base64-encoded PEM with a header and a footer * ie. a base64-encoded PEM with a header and a footer
*/ */
const FORMAT_PEM = 0; const FORMAT_PEM = 0;
/** /**
* Save as DER * Save as DER
*/ */
const FORMAT_DER = 1; const FORMAT_DER = 1;
/** /**
* Save as a SPKAC * Save as a SPKAC
* *
* Only works on CSRs. Not currently supported. * Only works on CSRs. Not currently supported.
*/ */
const FORMAT_SPKAC = 2; const FORMAT_SPKAC = 2;
/**#@-*/ /**#@-*/
/** /**
* Attribute value disposition. * Attribute value disposition.
* If disposition is >= 0, this is the index of the target value. * If disposition is >= 0, this is the index of the target value.
*/ */
const ATTR_ALL = -1; // All attribute values (array). const ATTR_ALL = -1; // All attribute values (array).
const ATTR_APPEND = -2; // Add a value. const ATTR_APPEND = -2; // Add a value.
const ATTR_REPLACE = -3; // Clear first, then add a value. const ATTR_REPLACE = -3; // Clear first, then add a value.

View File

@ -75,19 +75,19 @@ class BigInteger
const MONTGOMERY = 0; const MONTGOMERY = 0;
/** /**
* @see BigInteger::_barrett() * @see BigInteger::_barrett()
*/ */
const BARRETT = 1; const BARRETT = 1;
/** /**
* @see BigInteger::_mod2() * @see BigInteger::_mod2()
*/ */
const POWEROF2 = 2; const POWEROF2 = 2;
/** /**
* @see BigInteger::_remainder() * @see BigInteger::_remainder()
*/ */
const CLASSIC = 3; const CLASSIC = 3;
/** /**
* @see BigInteger::__clone() * @see BigInteger::__clone()
*/ */
const NONE = 4; const NONE = 4;
/**#@-*/ /**#@-*/
@ -101,11 +101,11 @@ class BigInteger
*/ */
/** /**
* $result[self::VALUE] contains the value. * $result[self::VALUE] contains the value.
*/ */
const VALUE = 0; const VALUE = 0;
/** /**
* $result[self::SIGN] contains the sign. * $result[self::SIGN] contains the sign.
*/ */
const SIGN = 1; const SIGN = 1;
/**#@-*/ /**#@-*/
@ -118,11 +118,11 @@ class BigInteger
* Cache constants * Cache constants
* *
* $cache[self::VARIABLE] tells us whether or not the cached data is still valid. * $cache[self::VARIABLE] tells us whether or not the cached data is still valid.
*/ */
const VARIABLE = 0; const VARIABLE = 0;
/** /**
* $cache[self::DATA] contains the cached data. * $cache[self::DATA] contains the cached data.
*/ */
const DATA = 1; const DATA = 1;
/**#@-*/ /**#@-*/
@ -134,19 +134,19 @@ class BigInteger
*/ */
/** /**
* To use the pure-PHP implementation * To use the pure-PHP implementation
*/ */
const MODE_INTERNAL = 1; const MODE_INTERNAL = 1;
/** /**
* To use the BCMath library * To use the BCMath library
* *
* (if enabled; otherwise, the internal implementation will be used) * (if enabled; otherwise, the internal implementation will be used)
*/ */
const MODE_BCMATH = 2; const MODE_BCMATH = 2;
/** /**
* To use the GMP library * To use the GMP library
* *
* (if present; otherwise, either the BCMath or the internal implementation will be used) * (if present; otherwise, either the BCMath or the internal implementation will be used)
*/ */
const MODE_GMP = 3; const MODE_GMP = 3;
/**#@-*/ /**#@-*/
@ -156,7 +156,7 @@ class BigInteger
* At what point do we switch between Karatsuba multiplication and schoolbook long multiplication? * At what point do we switch between Karatsuba multiplication and schoolbook long multiplication?
* *
* @access private * @access private
*/ */
const KARATSUBA_CUTOFF = 25; const KARATSUBA_CUTOFF = 25;
/**#@+ /**#@+
@ -172,13 +172,13 @@ class BigInteger
/** /**
* $max10 in greatest $max10Len satisfying * $max10 in greatest $max10Len satisfying
* $max10 = 10**$max10Len <= 2**$base. * $max10 = 10**$max10Len <= 2**$base.
*/ */
protected static $max10; protected static $max10;
/** /**
* $max10Len in greatest $max10Len satisfying * $max10Len in greatest $max10Len satisfying
* $max10 = 10**$max10Len <= 2**$base. * $max10 = 10**$max10Len <= 2**$base.
*/ */
protected static $max10Len; protected static $max10Len;
protected static $maxDigit2; protected static $maxDigit2;
/**#@-*/ /**#@-*/

View File

@ -17,7 +17,7 @@
* exit('bad login'); * exit('bad login');
* } * }
* $scp = new \phpseclib\Net\SCP($ssh); * $scp = new \phpseclib\Net\SCP($ssh);
*
* $scp->put('abcd', str_repeat('x', 1024*1024)); * $scp->put('abcd', str_repeat('x', 1024*1024));
* ?> * ?>
* </code> * </code>
@ -54,7 +54,7 @@ class SCP
const SOURCE_LOCAL_FILE = 1; const SOURCE_LOCAL_FILE = 1;
/** /**
* Reads data from a string. * Reads data from a string.
*/ */
const SOURCE_STRING = 2; const SOURCE_STRING = 2;
/**#@-*/ /**#@-*/
@ -65,11 +65,11 @@ class SCP
*/ */
/** /**
* SSH1 is being used. * SSH1 is being used.
*/ */
const MODE_SSH1 = 1; const MODE_SSH1 = 1;
/** /**
* SSH2 is being used. * SSH2 is being used.
*/ */
const MODE_SSH2 = 2; const MODE_SSH2 = 2;
/**#@-*/ /**#@-*/

View File

@ -56,7 +56,7 @@ class SFTP extends SSH2
* @see \phpseclib\Net\SSH2::_send_channel_packet() * @see \phpseclib\Net\SSH2::_send_channel_packet()
* @see \phpseclib\Net\SSH2::_get_channel_packet() * @see \phpseclib\Net\SSH2::_get_channel_packet()
* @access private * @access private
*/ */
const CHANNEL = 0x100; const CHANNEL = 0x100;
/**#@+ /**#@+
@ -65,11 +65,11 @@ class SFTP extends SSH2
*/ */
/** /**
* Reads data from a local file. * Reads data from a local file.
*/ */
const SOURCE_LOCAL_FILE = 1; const SOURCE_LOCAL_FILE = 1;
/** /**
* Reads data from a string. * Reads data from a string.
*/ */
// this value isn't really used anymore but i'm keeping it reserved for historical reasons // this value isn't really used anymore but i'm keeping it reserved for historical reasons
const SOURCE_STRING = 2; const SOURCE_STRING = 2;
/** /**
@ -79,11 +79,11 @@ class SFTP extends SSH2
const SOURCE_CALLBACK = 16; const SOURCE_CALLBACK = 16;
/** /**
* Resumes an upload * Resumes an upload
*/ */
const RESUME = 4; const RESUME = 4;
/** /**
* Append a local file to an already existing remote file * Append a local file to an already existing remote file
*/ */
const RESUME_START = 8; const RESUME_START = 8;
/**#@-*/ /**#@-*/

View File

@ -78,24 +78,24 @@ class SSH1
* IDEA in CFB mode * IDEA in CFB mode
* *
* Not supported. * Not supported.
*/ */
const CIPHER_IDEA = 1; const CIPHER_IDEA = 1;
/** /**
* DES in CBC mode * DES in CBC mode
*/ */
const CIPHER_DES = 2; const CIPHER_DES = 2;
/** /**
* Triple-DES in CBC mode * Triple-DES in CBC mode
* *
* All implementations are required to support this * All implementations are required to support this
*/ */
const CIPHER_3DES = 3; const CIPHER_3DES = 3;
/** /**
* TRI's Simple Stream encryption CBC * TRI's Simple Stream encryption CBC
* *
* Not supported nor is it defined in the official SSH1 specs. OpenSSH, however, does define it (see cipher.h), * Not supported nor is it defined in the official SSH1 specs. OpenSSH, however, does define it (see cipher.h),
* although it doesn't use it (see cipher.c) * although it doesn't use it (see cipher.c)
*/ */
const CIPHER_BROKEN_TSS = 4; const CIPHER_BROKEN_TSS = 4;
/** /**
* RC4 * RC4
@ -111,14 +111,14 @@ class SSH1
* *
* This library currently only supports encryption when the same key is being used for both directions. This is * This library currently only supports encryption when the same key is being used for both directions. This is
* because there's only one $crypto object. Two could be added ($encrypt and $decrypt, perhaps). * because there's only one $crypto object. Two could be added ($encrypt and $decrypt, perhaps).
*/ */
const CIPHER_RC4 = 5; const CIPHER_RC4 = 5;
/** /**
* Blowfish * Blowfish
* *
* Not supported nor is it defined in the official SSH1 specs. OpenSSH, however, defines it (see cipher.h) and * Not supported nor is it defined in the official SSH1 specs. OpenSSH, however, defines it (see cipher.h) and
* uses it (see cipher.c) * uses it (see cipher.c)
*/ */
const CIPHER_BLOWFISH = 6; const CIPHER_BLOWFISH = 6;
/**#@-*/ /**#@-*/
@ -130,21 +130,21 @@ class SSH1
*/ */
/** /**
* .rhosts or /etc/hosts.equiv * .rhosts or /etc/hosts.equiv
*/ */
const AUTH_RHOSTS = 1; const AUTH_RHOSTS = 1;
/** /**
* pure RSA authentication * pure RSA authentication
*/ */
const AUTH_RSA = 2; const AUTH_RSA = 2;
/** /**
* password authentication * password authentication
* *
* This is the only method that is supported by this library. * This is the only method that is supported by this library.
*/ */
const AUTH_PASSWORD = 3; const AUTH_PASSWORD = 3;
/** /**
* .rhosts with RSA host authentication * .rhosts with RSA host authentication
*/ */
const AUTH_RHOSTS_RSA = 4; const AUTH_RHOSTS_RSA = 4;
/**#@-*/ /**#@-*/
@ -162,7 +162,7 @@ class SSH1
* *
* @see \phpseclib\Net\SSH1::_get_binary_packet() * @see \phpseclib\Net\SSH1::_get_binary_packet()
* @access private * @access private
*/ */
const RESPONSE_TYPE = 1; const RESPONSE_TYPE = 1;
/** /**
@ -170,7 +170,7 @@ class SSH1
* *
* @see \phpseclib\Net\SSH1::_get_binary_packet() * @see \phpseclib\Net\SSH1::_get_binary_packet()
* @access private * @access private
*/ */
const RESPONSE_DATA = 2; const RESPONSE_DATA = 2;
/**#@+ /**#@+
@ -191,19 +191,19 @@ class SSH1
*/ */
/** /**
* Returns the message numbers * Returns the message numbers
*/ */
const LOG_SIMPLE = 1; const LOG_SIMPLE = 1;
/** /**
* Returns the message content * Returns the message content
*/ */
const LOG_COMPLEX = 2; const LOG_COMPLEX = 2;
/** /**
* Outputs the content real-time * Outputs the content real-time
*/ */
const LOG_REALTIME = 3; const LOG_REALTIME = 3;
/** /**
* Dumps the content real-time to a file * Dumps the content real-time to a file
*/ */
const LOG_REALTIME_FILE = 4; const LOG_REALTIME_FILE = 4;
/**#@-*/ /**#@-*/
@ -213,11 +213,11 @@ class SSH1
*/ */
/** /**
* Returns when a string matching $expect exactly is found * Returns when a string matching $expect exactly is found
*/ */
const READ_SIMPLE = 1; const READ_SIMPLE = 1;
/** /**
* Returns when a string matching the regular expression $expect is found * Returns when a string matching the regular expression $expect is found
*/ */
const READ_REGEX = 2; const READ_REGEX = 2;
/**#@-*/ /**#@-*/

View File

@ -112,19 +112,19 @@ class SSH2
*/ */
/** /**
* Returns the message numbers * Returns the message numbers
*/ */
const LOG_SIMPLE = 1; const LOG_SIMPLE = 1;
/** /**
* Returns the message content * Returns the message content
*/ */
const LOG_COMPLEX = 2; const LOG_COMPLEX = 2;
/** /**
* Outputs the content real-time * Outputs the content real-time
*/ */
const LOG_REALTIME = 3; const LOG_REALTIME = 3;
/** /**
* Dumps the content real-time to a file * Dumps the content real-time to a file
*/ */
const LOG_REALTIME_FILE = 4; const LOG_REALTIME_FILE = 4;
/**#@-*/ /**#@-*/
@ -134,15 +134,15 @@ class SSH2
*/ */
/** /**
* Returns when a string matching $expect exactly is found * Returns when a string matching $expect exactly is found
*/ */
const READ_SIMPLE = 1; const READ_SIMPLE = 1;
/** /**
* Returns when a string matching the regular expression $expect is found * Returns when a string matching the regular expression $expect is found
*/ */
const READ_REGEX = 2; const READ_REGEX = 2;
/** /**
* Make sure that the log never gets larger than this * Make sure that the log never gets larger than this
*/ */
const LOG_MAX_SIZE = 1048576; // 1024 * 1024 const LOG_MAX_SIZE = 1048576; // 1024 * 1024
/**#@-*/ /**#@-*/