decryptAccessLog method
Implementation
Future<DecryptedAccessLogDto> decryptAccessLog(String myId, AccessLogDto accessLogDto) async {
final secret = (await this.crypto.decryptEncryptionKeys(myId, accessLogDto.encryptionKeys)).firstOrNull?.formatAsKey().fromHexString();
if (secret == null) {
throw FormatException("Cannot get encryption key fo ${accessLogDto.id} and hcp $myId");
}
final es = accessLogDto.encryptedSelf;
return this.unmarshaller(accessLogDto, es != null ? base64.decoder.convert(es).decryptAES(secret) : null);
}