Fixed phpdoc

This commit is contained in:
Graham Campbell 2015-09-14 16:30:31 +01:00
parent 970398f341
commit 7f1bbfe216
11 changed files with 81 additions and 104 deletions

View File

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

View File

@ -59,11 +59,11 @@ class Hash
const MODE_INTERNAL = 1;
/**
* Toggles the mhash() implementation, which has been deprecated on PHP 5.3.0+.
*/
*/
const MODE_MHASH = 2;
/**
* Toggles the hash() implementation, which works on PHP 5.1.2+.
*/
*/
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
* compatibility with protocols (like SSH-1) written before OAEP's introduction.
*/
*/
const ENCRYPTION_PKCS1 = 2;
/**
* Do not use any padding
@ -113,14 +113,14 @@ class RSA
*
* @see \phpseclib\Crypt\RSA::setSaltLength()
* @see \phpseclib\Crypt\RSA::setMGFHash()
*/
*/
const SIGNATURE_PSS = 1;
/**
* Use the PKCS#1 scheme by default.
*
* 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.
*/
*/
const SIGNATURE_PKCS1 = 2;
/**#@-*/
@ -130,23 +130,23 @@ class RSA
*/
/**
* ASN1 Integer
*/
*/
const ASN1_INTEGER = 2;
/**
* ASN1 Bit String
*/
*/
const ASN1_BITSTRING = 3;
/**
* ASN1 Octet String
*/
*/
const ASN1_OCTETSTRING = 4;
/**
* ASN1 Object Identifier
*/
*/
const ASN1_OBJECT = 6;
/**
* ASN1 Sequence (with the constucted bit set)
*/
*/
const ASN1_SEQUENCE = 48;
/**#@-*/
@ -156,13 +156,13 @@ class RSA
*/
/**
* To use the pure-PHP implementation
*/
*/
const MODE_INTERNAL = 1;
/**
* To use the OpenSSL library
*
* (if enabled; otherwise, the internal implementation will be used)
*/
*/
const MODE_OPENSSL = 2;
/**#@-*/
@ -175,19 +175,19 @@ class RSA
* PKCS#1 formatted private key
*
* Used by OpenSSH
*/
*/
const PRIVATE_FORMAT_PKCS1 = 0;
/**
* PuTTY formatted private key
*/
*/
const PRIVATE_FORMAT_PUTTY = 1;
/**
* XML formatted private key
*/
*/
const PRIVATE_FORMAT_XML = 2;
/**
* PKCS#8 formatted private key
*/
*/
const PRIVATE_FORMAT_PKCS8 = 3;
/**#@-*/
@ -208,7 +208,7 @@ class RSA
* The modulus can be indexed with any of the following:
*
* 1, n, modulo, modulus
*/
*/
const PUBLIC_FORMAT_RAW = 3;
/**
* PKCS#1 formatted public key (raw)
@ -220,18 +220,18 @@ class RSA
* -----BEGIN RSA PUBLIC KEY-----
*
* Analogous to ssh-keygen's pem format (as specified by -m)
*/
*/
const PUBLIC_FORMAT_PKCS1 = 4;
const PUBLIC_FORMAT_PKCS1_RAW = 4;
/**
* XML formatted public key
*/
*/
const PUBLIC_FORMAT_XML = 5;
/**
* OpenSSH formatted public key
*
* Place in $HOME/.ssh/authorized_keys
*/
*/
const PUBLIC_FORMAT_OPENSSH = 6;
/**
* 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
* 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)
*/
*/
const PUBLIC_FORMAT_PKCS8 = 7;
/**#@-*/

View File

@ -189,29 +189,6 @@ class Rijndael extends Base
*/
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.
*

View File

@ -60,7 +60,7 @@ class TripleDES extends DES
* Encrypt / decrypt using outer chaining
*
* 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;
/**

View File

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

View File

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

View File

@ -17,7 +17,7 @@
* exit('bad login');
* }
* $scp = new \phpseclib\Net\SCP($ssh);
*
* $scp->put('abcd', str_repeat('x', 1024*1024));
* ?>
* </code>
@ -54,7 +54,7 @@ class SCP
const SOURCE_LOCAL_FILE = 1;
/**
* Reads data from a string.
*/
*/
const SOURCE_STRING = 2;
/**#@-*/
@ -65,11 +65,11 @@ class SCP
*/
/**
* SSH1 is being used.
*/
*/
const MODE_SSH1 = 1;
/**
* SSH2 is being used.
*/
*/
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::_get_channel_packet()
* @access private
*/
*/
const CHANNEL = 0x100;
/**#@+
@ -65,11 +65,11 @@ class SFTP extends SSH2
*/
/**
* Reads data from a local file.
*/
*/
const SOURCE_LOCAL_FILE = 1;
/**
* Reads data from a string.
*/
*/
// this value isn't really used anymore but i'm keeping it reserved for historical reasons
const SOURCE_STRING = 2;
/**
@ -79,11 +79,11 @@ class SFTP extends SSH2
const SOURCE_CALLBACK = 16;
/**
* Resumes an upload
*/
*/
const RESUME = 4;
/**
* Append a local file to an already existing remote file
*/
*/
const RESUME_START = 8;
/**#@-*/

View File

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

View File

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