MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / pemReadPrivateKey

Function pemReadPrivateKey

plugins/wasi_crypto/utils/evp_wrapper.cpp:64–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64EVP_PKEY *pemReadPrivateKey(Span<const uint8_t> Encoded) {
65 auto Bio = createBioFromSpan(Encoded);
66 if (!Bio) {
67 return nullptr;
68 }
69 return PEM_read_bio_PrivateKey(Bio.get(), nullptr, nullptr, nullptr);
70}
71
72WasiCryptoExpect<SecretVec> pemWritePrivateKey(EVP_PKEY *Key) {
73 return writeKeyToBio<SecretVec>(Key, [](BIO *B, EVP_PKEY *K) {

Callers 3

importPemMethod · 0.85
importPemMethod · 0.85
importPemMethod · 0.85

Calls 2

createBioFromSpanFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected