Skip to content

Commit

Permalink
chore: update to sd_hash
Browse files Browse the repository at this point in the history
Signed-off-by: Timo Glastra <[email protected]>
  • Loading branch information
TimoGlastra committed May 1, 2024
1 parent 8807a92 commit 64e6408
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 @@ -309,7 +309,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 @@ -495,7 +495,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 64e6408

Please sign in to comment.