Skip to content

ParsedPkcs12MacData ​

ParsedPkcs12MacData ​

Decoded PKCS#12 MacData block returned by parsePkcs12MacData. type names the MAC: 'pkcs12-kdf' for the RFC 7292 MAC and 'pbmac1' for RFC 9879 PBMAC1.

ts
type ParsedPkcs12MacData = {
  readonly type: "pkcs12-kdf";
  readonly digestAlgorithmOid: string;
  readonly digestAlgorithmName: string;
  readonly digestHex: string;
  readonly saltHex: string;
  readonly iterations: number;
  readonly verification: "valid" | "invalid" | "unchecked"
} | {
  readonly type: "pbmac1";
  readonly digestAlgorithmOid: string;
  readonly digestAlgorithmName: string;
  readonly digestHex: string;
  readonly saltHex: string;
  readonly iterations: number;
  readonly keyLength: number;
  readonly prf: "HMAC-SHA-256" | "HMAC-SHA-384" | "HMAC-SHA-512";
  readonly messageAuthScheme: "HMAC-SHA-256" | "HMAC-SHA-384" | "HMAC-SHA-512";
  readonly verification: "valid" | "invalid" | "unchecked"
}

Released under the MIT License.