System_SSH_Agent_Identity
class System_SSH_Agent_Identity (View source)
Pure-PHP ssh-agent client identity object
Instantiation should only be performed by System_SSH_Agent class. This could be thought of as implementing an interface that Crypt_RSA implements. ie. maybe a Net_SSH_Auth_PublicKey interface or something. The methods in this interface would be getPublicKey, setSignatureMode and sign since those are the methods phpseclib looks for to perform public key authentication.
Properties
| Crypt_RSA | $key | Key Object | |
| string | $key_blob | Key Blob | |
| resource | $fsock | Socket Resource | |
| int | $flags | Signature flags | 
Methods
Default Constructor.
PHP4 compatible Default Constructor.
Set Public Key
Get Public Key
Set Signature Mode
Set Hash
Create a signature
String Shift
Details
        
                            System_SSH_Agent_Identity
    __construct(resource $fsock)
        
    
    Default Constructor.
        
                            
    System_SSH_Agent_Identity(resource $fsock)
        
    
    PHP4 compatible Default Constructor.
        
                            
    setPublicKey(Crypt_RSA $key)
        
    
    Set Public Key
Called by System_SSH_Agent::requestIdentities()
        
                            
    setPublicKeyBlob(string $key_blob)
        
    
    Set Public Key
Called by System_SSH_Agent::requestIdentities(). The key blob could be extracted from $this->key but this saves a small amount of computation.
        
                            mixed
    getPublicKey(int $format = null)
        
    
    Get Public Key
Wrapper for $this->key->getPublicKey()
        
                            
    setSignatureMode(int $mode)
        
    
    Set Signature Mode
Doesn't do anything as ssh-agent doesn't let you pick and choose the signature mode. ie. ssh-agent's only supported mode is CRYPT_RSA_SIGNATURE_PKCS1
        
                            
    setHash(string $hash)
        
    
    Set Hash
ssh-agent doesn't support using hashes for RSA other than SHA1
        
                            string
    sign(string $message)
        
    
    Create a signature
See "2.6.2 Protocol 2 private key signature request"
        
                            string
    _string_shift(string $string, int $index = 1)
        
    
    String Shift
Inspired by array_shift