Encryption.PubKeyDecrypt
------------------------

Decrypts data with a private key.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [Encryption](component_Encryption.md) | [16.3](newinversion163.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "Encryption.PubKeyDecrypt"; InputType; InputData; InputEncoding; PKeyRef; OutputType { ; OutputInfo } ) 

**MBS**( **"Encryption.PubKeyDecrypt";** /\* Decrypts data with a private key. \*/  
**$InputType**; /\* The type of input.   
Can be Text, Container, Image, Path, PDF, Data, base64 or Hex.e.g. "Text" \*/   
**$InputData**; /\* The actual input data.   
Text, container or file path.e.g. "Hello World" \*/   
**$InputEncoding**; /\* The text encoding for text input.   
Parameter is ignored for other cases.e.g. "UTF-8" \*/   
**$PKeyRef**; /\* The reference to the private key.e.g. $pkey \*/   
**$OutputType**; /\* The output type.   
Can be Base64, Hex, Text, File, Path.e.g. "Hex" \*/   
**$OutputInfo**) /\* Optional; The addition info for output.   
For text it is the text encoding, for file container the file name and for path the actual native file path.e.g. "" \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| InputType | The type of input.    Can be Text, Container, Image, Path, PDF, Data, base64 or Hex. | "Text" |  |
| InputData | The actual input data.    Text, container or file path. | "Hello World" |  |
| InputEncoding | The text encoding for text input.    Parameter is ignored for other cases. | "UTF-8" |  |
| PKeyRef | The reference to the private key. | $pkey |  |
| OutputType | The output type.    Can be Base64, Hex, Text, File, Path. | "Hex" |  |
| OutputInfo | The addition info for output.    For text it is the text encoding, for file container the file name and for path the actual native file path. | "" | Optional |

### Result

Returns OK or error.

### Description

Decrypts data with a private key.  
Using RSA-OAEP, OAEP SHA-256 and MGF1 SHA-256.  
### See also

- [Encryption.PubKeyEncrypt](EncryptionPubKeyEncrypt.md)

This function checks for a license.

Created 22nd May 2026 , last changed 22nd May 2026

  
[Encryption.ProviderNames](EncryptionProviderNames.md) - [Encryption.PubKeyEncrypt](EncryptionPubKeyEncrypt.md)

[HTML Version](EncryptionPubKeyDecrypt.shtml)