PKey.GetPublicKey
-----------------

Queries public key as PEM file text.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Certificates](component_Certificates.md) | [7.0](newinversion70.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "PKey.GetPublicKey"; PKeyRef ) 

**MBS**( **"PKey.GetPublicKey";** /\* Queries public key as PEM file text. \*/  
**$PKeyRef**) /\* The reference to the private key.e.g. $pkey \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PKeyRef | The reference to the private key. | $pkey |

### Result

Returns text or error.

### Description

Queries public key as PEM file text.  
### See also

- [ECKey.ReadPublicKey](ECKeyReadPublicKey.md)
- [RSA.GetPublicKey](RSAGetPublicKey.md)

This function checks for a license.

Created 23th December 2016 , last changed 23th December 2016

  
[PKey.GetPrivateKey](PKeyGetPrivateKey.md) - [PKey.List](PKeyList.md)

[HTML Version](PKeyGetPublicKey.shtml)