Web3S_Demo > Web 3S Crypto Function Library > Convert Private Key (Raw EC -> PEM)

Convert Private Key (Raw EC -> PEM)

Converts a raw EC private key into a PEM-encoded private key.

Inputs

In
Exec

Private Key (Raw EC)
Array of Bytes

raw EC private key data

EC Key Type
EWeb3S_CryptoEcKeyType Enum

Elliptic curve-based key type

Password
String

password for encrypting a pass-phrase encrypted PEM key. For unencrypted keys leave empty.

Outputs

Out
Exec

Error Message
String

if failed, error message

Private Key (P EM)
Array of Bytes

if successful, raw, PEM-encoded private key data

Success
Boolean

True if conversion was successful, false otherwise