Пример #1
0
        public static async ValueTask <Stream?> Encrypt(Stream data)
        {
            using Stream encrypted = await AesEncryptionProvider.EncryptAsync(data);

            Stream result = SaveFileHandler.PrependMagicToEncrypted(encrypted);

            result.Seek(0, SeekOrigin.Begin);
            return(result);
        }
Пример #2
0
        private static async ValueTask <Stream?> Encrypt(Stream data)
        {
            await using Stream encrypted = await AesEncryptionProvider.EncryptAsync(data);

            return(SaveFileHandler.PrependMagicToEncrypted(encrypted));
        }