/**
  * Decrypt PrivateKeyInfo from the encrypted data.
  *
  * @param string $password
  * @param Crypto $crypto
  * @return PrivateKeyInfo
  */
 public function decryptPrivateKeyInfo($password, Crypto $crypto)
 {
     try {
         $scheme = PBEScheme::fromAlgorithmIdentifier($this->_algo, $crypto);
         $data = $scheme->decrypt($this->_data, $password);
         return PrivateKeyInfo::fromASN1(Sequence::fromDER($data));
     } catch (\RuntimeException $e) {
         throw new \RuntimeException("Failed to decrypt private key.", 0, $e);
     }
 }