private static MicrosoftDataEncryptionException ThrowDecryptionFailedException(byte[] encryptionKey, byte[] ciphertext, string reason)
        {
            string lastTenBytesOfKey         = GetBytesAsString(encryptionKey, startFromEnd: true, countOfBytes: 10);
            string firstTenBytesOfCiphertext = GetBytesAsString(ciphertext, startFromEnd: false, countOfBytes: 10);

            throw new MicrosoftDataEncryptionException(DecryptionFailed.Format(lastTenBytesOfKey, firstTenBytesOfCiphertext, reason));
        }
Ejemplo n.º 2
0
 internal void OnDecryptionFailed(object message, Exception e)
 {
     DecryptionFailed?.Invoke(message, new ClientSideDecryptionFailureEventArgs(e));
 }