Esempio n. 1
0
        public async static Task <DecryptedStream> CreateAsync(Stream encryptedStream, string sharedSecret, string salt, int contentLength)
        {
            var instance = new DecryptedStream();
            await instance.InitAsync(encryptedStream, sharedSecret, salt, contentLength)
            .IgnoreContext();

            return(instance);
        }
Esempio n. 2
0
        public static DecryptedStream Create(Stream encryptedStream, string sharedSecret, string salt, int contentLength)
        {
            var instance = new DecryptedStream();

            TaskHelper.WaitSafeSync(() => instance.InitAsync(encryptedStream, sharedSecret, salt, contentLength));

            return(instance);
        }