Found the solution:
this code:
let symmetricKey = sharedSecret.hkdfDerivedSymmetricKey(
using: SHA256.self,
salt: Data(),
sharedInfo: Data(),
outputByteCount: 32
)
should be replaced with this code:
let symmetricKey = SymmetricKey(data: sharedSecret)
Topic:
Privacy & Security
SubTopic:
General
Tags: