const encrypt = async (publicToEncrypt: JWK.Key, data: JWS.CreateSignResult): Promise<string> => {
const encrypted = await JWE
.createEncrypt({
contentAlg: 'A256GCM',
format: 'compact',
fields: {
alg: 'RSA-OAEP-256',
cty: 'JWT',
enc: 'A256GCM',
iss: 'COMPANY'
}
}, publicToEncrypt)
.update(data) // <--- here
.final()
return encrypted
}
In the update function, the input data is received as a parameter but the data type is any
Here is what I am saying:
(method) JWE.Encryptor.update(input: any): JWE.Encryptor
In the update function, the input data is received as a parameter but the data type is any
Here is what I am saying: