public function signature($signature, $private_key = false) {
		
		$signature = strtoupper($signature);
		
		// RSA-SHA1 public key/private key encryption
		if ($signature == 'RSA' || $signature == 'RSA-SHA1') {
			
			// private key must be provided
			if (!$private_key){
				return false;
			}
			
			// signature method set to RSA-SHA1 using this private key (interacts with OAuth class)
			$this->signature = new RsaSha1($private_key);
			
			return true;
			
		} elseif ($signature == 'HMAC' || $signature == 'HMAC-SHA1') {
			
			// signature method set to HMAC-SHA1 - no private key
			$this->signature = new HmacSha1;
			
			return true;
		} else {
			// signature method was not recognised
			return false;
		}
		
	}
public function signature($signature, $private_key = false) {
		
		$signature = strtoupper($signature);
		
		// RSA-SHA1 public key/private key encryption
		if ($signature == 'RSA' || $signature == 'RSA-SHA1') {
			
			// private key must be provided
			if (!$private_key){
				return false;
			}
			
			// signature method set to RSA-SHA1 using this private key (interacts with OAuth class)
			$this->signature = new RsaSha1($private_key);
			
			return true;
			
		} elseif ($signature == 'HMAC' || $signature == 'HMAC-SHA1') {
			
			// signature method set to HMAC-SHA1 - no private key
			$this->signature = new HmacSha1;
			
			return true;
		} else {
			// signature method was not recognised
			return false;
		}
		
	}
public function signature ( $ signature , $ private_key = false ) { $ signature = strtoupper ( $ signature ) ; // RSA-SHA1 public key/private key encryption if ( $ signature == 'RSA' || $ signature == 'RSA-SHA1' ) { // private key must be provided if ( ! $ private_key ) { return false ; } // signature method set to RSA-SHA1 using this private key (interacts with OAuth class) $ this -> signature = new RsaSha1 ( $ private_key ) ; return true ; } elseif ( $ signature == 'HMAC' || $ signature == 'HMAC-SHA1' ) { // signature method set to HMAC-SHA1 - no private key $ this -> signature = new HmacSha1 ; return true ; } else { // signature method was not recognised return false ; } }
Set the signing method to be used to encrypt request signature.

@param string $signature         Signature encryption method: RSA|HMAC
@param string $private_key       openssl RSA private key (only needed if using RSA)
@return boolean                  true if able to use this signing type
Set the signing method to be used to encrypt request signature .