Skip to content

parsePkcs12MacData

Decodes a DER-encoded MacData block. When password is provided, verifies the MAC and reports the outcome in verification.

Returns a typed failure (code: 'malformed') on malformed input. For the throwing form use parsePkcs12MacDataOrThrow.

ts
function parsePkcs12MacData(
	der: Uint8Array,
	authenticatedSafe: Uint8Array,
	password?: string,
): Promise<ParsePkcs12MacDataResult>

Parameters

  • der: Uint8Array
  • authenticatedSafe: Uint8Array
  • password?: string

Released under the MIT License.