C# Class Cimbalino.Phone.Toolkit.Extensions.StreamExtensions

Provides a set of static (Shared in Visual Basic) methods for Stream instances.
Show file Open project: Cimbalino/Cimbalino-Phone-Toolkit

Public Methods

Method Description
ComputeHMACSHA1Hash ( this input, byte key ) : byte[]

Computes the HMACSHA1 hash for the current byte array using the managed library.

ComputeHMACSHA256Hash ( this input, byte key ) : byte[]

Computes the SHA256 hash for the current byte array using the managed library.

ComputeSHA1Hash ( this input ) : byte[]

Computes the SHA1 hash for the current byte array using the managed library.

ComputeSHA256Hash ( this input ) : byte[]

Computes the SHA256 hash for the current byte array using the managed library.

ToArray ( this input ) : byte[]

Writes the stream contents to a byte array.

ToArrayAsync ( this input ) : Task

Writes the stream contents to a byte array.

Method Details

ComputeHMACSHA1Hash() public static method

Computes the HMACSHA1 hash for the current byte array using the managed library.
public static ComputeHMACSHA1Hash ( this input, byte key ) : byte[]
input this The input to compute the hash code for.
key byte The key to use in the hash algorithm.
return byte[]

ComputeHMACSHA256Hash() public static method

Computes the SHA256 hash for the current byte array using the managed library.
public static ComputeHMACSHA256Hash ( this input, byte key ) : byte[]
input this The input to compute the hash code for.
key byte The key to use in the hash algorithm.
return byte[]

ComputeSHA1Hash() public static method

Computes the SHA1 hash for the current byte array using the managed library.
public static ComputeSHA1Hash ( this input ) : byte[]
input this The input to compute the hash code for.
return byte[]

ComputeSHA256Hash() public static method

Computes the SHA256 hash for the current byte array using the managed library.
public static ComputeSHA256Hash ( this input ) : byte[]
input this The input to compute the hash code for.
return byte[]

ToArray() public static method

Writes the stream contents to a byte array.
public static ToArray ( this input ) : byte[]
input this The input stream.
return byte[]

ToArrayAsync() public static method

Writes the stream contents to a byte array.
public static ToArrayAsync ( this input ) : Task
input this The input stream.
return Task