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

Convert Private Key (PEM -> Raw EC)

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

Inputs

In
Exec

Private Key (P EM)
Array of Bytes

raw, PEM-encoded private key data

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 (Raw EC)
Array of Bytes

if successful, raw EC private key data

EC Key Type
EWeb3S_CryptoEcKeyType Enum

if successful, Elliptic curve-based key type

Success
Boolean

true if conversion was successful, false otherwise