MCPcopy Create free account
hub / github.com/WICG/webpackage / parseMaybeEncryptedKeyFromFile

Function parseMaybeEncryptedKeyFromFile

js/sign/src/utils/cli-utils.ts:14–21  ·  view source on GitHub ↗
(
  filePath: string
)

Source from the content-addressed store, hash-verified

12// `WEB_BUNDLE_SIGNING_PASSPHRASE` environment variable, or, if not set, prompts
13// the user for the passphrase.
14export async function parseMaybeEncryptedKeyFromFile(
15 filePath: string
16): Promise<KeyObject> {
17 return parseMaybeEncryptedKey(
18 fs.readFileSync(filePath),
19 path.basename(filePath)
20 );
21}
22
23// Exported for testing.
24export async function parseMaybeEncryptedKey(

Callers 3

parseArgumentsFunction · 0.90
parseKeyFunction · 0.90

Calls 1

parseMaybeEncryptedKeyFunction · 0.85

Tested by

no test coverage detected