def parse_data
      # NOTE: Don't print @data. Not even in debug output. The same goes for +@keypair+.
      # We don't want private keys to end up somewhere we don't expect them. 
      raise OpenSSL::PKey::PKeyError, "No key data" if @data.nil? 
      @data.strip!
      @data =~ /\A-----BEGIN (\w+?) (P\w+?) KEY-----$/  # \A matches the string beginning (^ works on lines)
      raise OpenSSL::PKey::PKeyError, "Bad key data" unless $1 && $2
      raise OpenSSL::PKey::PKeyError, "Unknown type #{$1}" unless Rye::Key.supported_authentication?($1)
      raise OpenSSL::PKey::PKeyError, "Unknown value #{$2}" unless Rye::Key.supported_keytype?($2)
      @authtype, @keytype = $1, $2
      @keypair = OpenSSL::PKey::RSA.new(@data) if self.rsa?
      @keypair = OpenSSL::PKey::DSA.new(@data) if self.dsa?
    end
def parse_data
      # NOTE: Don't print @data. Not even in debug output. The same goes for +@keypair+.
      # We don't want private keys to end up somewhere we don't expect them. 
      raise OpenSSL::PKey::PKeyError, "No key data" if @data.nil? 
      @data.strip!
      @data =~ /\A-----BEGIN (\w+?) (P\w+?) KEY-----$/  # \A matches the string beginning (^ works on lines)
      raise OpenSSL::PKey::PKeyError, "Bad key data" unless $1 && $2
      raise OpenSSL::PKey::PKeyError, "Unknown type #{$1}" unless Rye::Key.supported_authentication?($1)
      raise OpenSSL::PKey::PKeyError, "Unknown value #{$2}" unless Rye::Key.supported_keytype?($2)
      @authtype, @keytype = $1, $2
      @keypair = OpenSSL::PKey::RSA.new(@data) if self.rsa?
      @keypair = OpenSSL::PKey::DSA.new(@data) if self.dsa?
    end
Creates an OpenSSL::PKey object from +@data+.