Skip to content

Commit

Permalink
Merge pull request #158 from TimoGlastra/chore/update-sd-hash
Browse files Browse the repository at this point in the history
chore: update to sd_hash
  • Loading branch information
nklomp authored Jul 23, 2024
2 parents 9fe0f92 + 64e6408 commit b592d3a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/PEX.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ export class PEX {
// aud MUST be set by the signer or provided by e.g. SIOP/OpenID4VP lib
payload: {
iat: new Date().getTime(),
_sd_hash: sdHash,
sd_hash: sdHash,
},
} satisfies SdJwtKbJwtInput;

Expand Down Expand Up @@ -526,7 +526,7 @@ export class PEX {
payload: {
iat: new Date().getTime(),
nonce: proofOptions?.nonce,
_sd_hash: sdHash,
sd_hash: sdHash,
},
} satisfies SdJwtKbJwtInput;

Expand Down
2 changes: 1 addition & 1 deletion lib/signing/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export interface SdJwtKbJwtInput {
};
payload: {
iat: number;
_sd_hash: string;
sd_hash: string;
nonce?: string;
};
}
Expand Down
2 changes: 1 addition & 1 deletion test/SdJwt.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ describe('evaluate', () => {
payload: {
iat: expect.any(Number),
nonce: undefined,
_sd_hash: calculateSdHash(decodedSdJwtVcWithDisclosuresRemoved.compactSdJwtVc, 'sha-256', hasher),
sd_hash: calculateSdHash(decodedSdJwtVcWithDisclosuresRemoved.compactSdJwtVc, 'sha-256', hasher),
},
},
});
Expand Down

0 comments on commit b592d3a

Please sign in to comment.