Beispiel #1
0
        private async Task <Stream> GetEncryptedPayload(MeldingRequest request, IList <IPayload> payload)
        {
            if (payload.Count == 0)
            {
                return(null);
            }

            var publicKey = await _publicKeyProvider.GetPublicKey(request.MottakerKontoId).ConfigureAwait(false);

            var encryptedPayload = _asicEncrypter.Encrypt(publicKey, payload);

            encryptedPayload.Seek(0, SeekOrigin.Begin);
            return(encryptedPayload);
        }