ParagonIE\Halite\KeyPair::getSecretKey PHP Method

getSecretKey() public method

Get a Key object for the secret key
public getSecretKey ( ) : SecretKey
return SecretKey
    public function getSecretKey()
    {
        return $this->secretKey;
    }

Usage Example

Example #1
0
 /**
  * Save a key to a file
  * 
  * @param Key|KeyPair $key
  * @param string $filename
  * @return bool
  */
 public static function save($key, string $filename = '') : bool
 {
     if ($key instanceof KeyPair) {
         return self::saveKeyFile($filename, $key->getSecretKey()->getRawKeyMaterial());
     }
     return self::saveKeyFile($filename, $key->getRawKeyMaterial());
 }
All Usage Examples Of ParagonIE\Halite\KeyPair::getSecretKey