<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "OpenSSL",
  "identifier" : "/documentation/OpenSSL/RSA/PrivateKey/pemData",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "OpenSSL"
    ],
    "preciseIdentifier" : "s:7OpenSSL3RSAO10PrivateKeyV7pemData10Foundation0G0Vvp"
  },
  "title" : "pemData"
}
-->

# pemData

The original PEM bytes as supplied to [`init(pemRepresentation:)`](/documentation/OpenSSL/RSA/PrivateKey/init(pemRepresentation:)).

```
var pemData: Data { get }
```

## Return Value

A `Data` containing the original PEM bytes in
UTF-8. Use it for persistence, transport to an HSM, or
future provider-backed signing APIs.

## Discussion

Returns the UTF-8 encoding of the input string verbatim — not
a re-serialized PEM, and not a DER blob. This is the form
expected by keychain imports, HSM shims, and on-disk key
storage formats that treat the PEM text as an opaque transport
envelope. Because the storage is the user-provided input,
header comments and vendor annotations outside the `BEGIN`/
`END` markers are preserved round-trip.

> Important: The returned bytes contain private-key material.
> Never log this value, never include it in crash reports or
> analytics, and zero any backing buffer you copy it into
> before releasing the memory. Foundation’s `Data` does not
> zeroize on deinit.