Class AesDataUtils

Inheritance
System.Object
AesDataUtils
Namespace: Catalog.Helpers
Assembly: Catalog.dll
Syntax
public static class AesDataUtils

Methods

CalculateIVForBlock(UInt64, Byte[])

Calculates the IV for a specified block index.

Declaration
public static byte[] CalculateIVForBlock(ulong block, byte[] firstIV)
Parameters
Type Name Description
System.UInt64 block

The index of the block.

System.Byte[] firstIV

The IV of the first block.

Returns
Type Description
System.Byte[]

The IV

DecryptBlocksAsync(AesDataHeader, AesManaged, IRandomAccessStream, UInt64, UInt32)

Decrypts blocks in a stream. If there are fewer blocks available than requested then that number are returned.

Declaration
public static async Task<byte[]> DecryptBlocksAsync(AesDataHeader header, AesManaged manager, IRandomAccessStream stream, ulong count, uint offset)
Parameters
Type Name Description
AesDataHeader header

The stream header.

System.Security.Cryptography.AesManaged manager

The AES manager.

Windows.Storage.Streams.IRandomAccessStream stream

The stream.

System.UInt64 count

Number of blocks to decrypt.

System.UInt32 offset

The offset block index.

Returns
Type Description
System.Threading.Tasks.Task<System.Byte[]>

The decrypted blocks.