WIP WIP WIP crypto

This commit is contained in:
Philipp Heckel 2022-07-08 08:16:03 -04:00
parent 67da1e4922
commit e5dc2242c4
7 changed files with 3497 additions and 12 deletions

View file

@ -0,0 +1,7 @@
import * as jose from 'jose'
async function publish() {
const jwe = await new jose.CompactEncrypt(new TextEncoder().encode('Secret message from JS!'))
.setProtectedHeader({ alg: 'dir', enc: 'A256GCM' })
.encrypt(publicKey)
}