C# Class OathNet.Base32

Contains methods to convert to and from base-32 according to RFC 3548.
显示文件 Open project: jennings/OATH.Net Class Usage Examples

Public Methods

Method Description
ToBase32 ( byte data ) : string

Converts a byte array to a base-32 representation.

ToBinary ( string base32 ) : byte[]

Converts a base-32 encoded string to a byte array.

Private Methods

Method Description
ConvertSegmentToBase32 ( byte segment ) : string
ConvertSegmentToBinary ( char segment ) : byte[]

Method Details

ToBase32() public static method

Converts a byte array to a base-32 representation.
public static ToBase32 ( byte data ) : string
data byte The data to convert.
return string

ToBinary() public static method

Converts a base-32 encoded string to a byte array.
The argument is not a valid base32-encoded string.
public static ToBinary ( string base32 ) : byte[]
base32 string A base-32 encoded string.
return byte[]