Skip to content

Commit

Permalink
add diag
Browse files Browse the repository at this point in the history
  • Loading branch information
OR13 committed Feb 23, 2024
1 parent f9252f2 commit fb1d9c6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/hpke.direct.diag
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
96([h'a1011823', {}, h'cb3fbf75dd90e2848e7cde4451a82f0233dc00a96394c4232c2bc79aacb6b648d2bf9ba72db83c232b5d8832601af2d865317a49b3feb385288b5d28788a3f52200fc012ae8c99c42dcd5fdbdda825dd', [[h'a1011823', {4: "meriadoc.brandybuck@buckland.example", -1: {1: 5, -1: h'048f98972f38af086e2b8cdb40ffd2c0b22ef5d600f263f1541f09907e97dbe0af06aaf0dcdcd47ce7d1913c5dad4d689b89cbfd28ab45d446c662301483676bf9'}}, h'']]])
1 change: 1 addition & 0 deletions examples/hpke.wrap.diag
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
96([h'a10101', {5: 64(h'41469c98fcbd872dd11a01df13b33743')}, h'55181b9b3e619ed041fbd863ecf62517f1eabafaa3b61f7d204b1b7f5cda6ddd36726df0219c1842351bcc65219a5c2222d0e8163ab478cf61b3916bb3dc0e805fd6aa297bd84b394c4792f9421b0391', [[h'a1011823', {4: "meriadoc.brandybuck@buckland.example", -1: {1: 5, -1: h'04b5f1c2cb90d20ec23ed8adafd0f548ceccc72a1ac3b189bc646eb02ed5621fe3216c88e777d201b24103b65a5dfce8ca5afefffada562a9b776361cf843a8300'}}, h'b4622b2ef308e90fea8c70858089df4ebf95dc6091ac2e45122cb93b5f7b5e26']]])
4 changes: 4 additions & 0 deletions test/hpke.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import * as transmute from '../src'
import fs from 'fs'
import { cbor } from '@transmute/cose'

it('wrap', async () => {
const protectedHeader = new Map<number, any>([
Expand Down Expand Up @@ -40,6 +42,7 @@ it('wrap', async () => {
}
})
expect(new TextDecoder().decode(decrypted)).toBe("💀 My lungs taste the air of Time Blown past falling sands ⌛")
fs.writeFileSync('./examples/hpke.wrap.diag', await cbor.diagnose(ct))
})


Expand Down Expand Up @@ -83,4 +86,5 @@ it('direct', async () => {
}
})
expect(new TextDecoder().decode(decrypted)).toBe("💀 My lungs taste the air of Time Blown past falling sands ⌛")
fs.writeFileSync('./examples/hpke.direct.diag', await cbor.diagnose(ct))
})

0 comments on commit fb1d9c6

Please sign in to comment.