Skip to content

Commit

Permalink
cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
OR13 committed Oct 24, 2024
1 parent 44541bb commit 60e590e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions tests/cross.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,12 @@ import { jose as hpke } from '../src'

const token = `ewogICJlbmMiIDogImRpciIsCiAgImFsZyIgOiAiSFBLRS1QMjU2LVNIQTI1Ni1BMTI4R0NNIgp9.BJyCM45zphHr9aIc7aZx3ug0RQY10fuvS8fYZxXG1_JUEArboE9QDwHYS_sPlF_67z_OsPpCA3iM7Iu0zaSNq08..Ju7xVmgyk77bmbRfJtr7diBfexyp4rqO09Rpo0Vn2xxxfGqlYsiMhUPd3gyetXI6qsrfPnbUU8M0eJVVMMWmRo9VWtyoPbGtCEZDK4GZI2GTDP7D-U0ah_espkW2hsVJZbLwOYsaU_DRQFJyDRi31p6NGS3GZMdAVrLXESk0k4AZ6BaEEVz1.`

const hpke_info = new TextEncoder().encode('B97CF7BF-3F35-4367-A898-D537B7A26F51')
it('decrypt', async () => {
const result = await hpke.jwt.decryptJWT(
token,
{
recipientPrivateKey: private_key,
hpke_info
hpke_info: new TextEncoder().encode('B97CF7BF-3F35-4367-A898-D537B7A26F51')
})
expect(result.protectedHeader.alg).toBe('HPKE-P256-SHA256-A128GCM')
expect(result.protectedHeader.enc).toBe('dir')
Expand Down

0 comments on commit 60e590e

Please sign in to comment.