# Class: PublicKey

## PublicKey(packetlist)

Class that represents an OpenPGP Public Key

## Constructor

#### new PublicKey(packetlist)

##### Parameters:

Name | Type | Description
--- | --- | ---
`packetlist` | PacketList | The packets that form this key

Source:
  - key/public_key.js, line 23

### Methods

#### armor(configopt) → {ReadableStream.<String>}

Returns ASCII armored text of key

##### Parameters:

Name | Type | Attributes | Description
--- | --- | --- | ---
`config` | Object | <optional> | Full configuration, defaults to openpgp.config

Source:
  - key/public_key.js, line 63

##### Returns:

ASCII armor.

Type
  ReadableStream.<String>

#### isPrivate() → {false}

Returns true if this is a private key

Source:
  - key/public_key.js, line 46

##### Returns:

Type
  false

#### toPublic() → {PublicKey}

Returns key as public key (shallow copy)

Source:
  - key/public_key.js, line 54

##### Returns:

New public Key

Type
  PublicKey