C# Class Ipfs.Base58

A codec for IPFS Base-58.

A codec for Base-58, Encode and Decode. Adds the extension method ToBase58 to encode a byte array and FromBase58 to decode a Base-58 string.

This is just thin wrapper of .

This codec uses the BitCoin alphabet not Flickr's.

Datei anzeigen Open project: richardschneider/net-ipfs-core Class Usage Examples

Public Methods

Method Description
Decode ( string s ) : byte[]

Converts the specified string, which encodes binary data as base 58 digits, to an equivalent 8-bit unsigned integer array.

Encode ( byte bytes ) : string

Converts an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-58 characters.

FromBase58 ( this s ) : byte[]

Converts the specified string, which encodes binary data as base 58 digits, to an equivalent 8-bit unsigned integer array.

ToBase58 ( this bytes ) : string

Converts an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-58 digits.

Method Details

Decode() public static method

Converts the specified string, which encodes binary data as base 58 digits, to an equivalent 8-bit unsigned integer array.
public static Decode ( string s ) : byte[]
s string /// The base 58 string to convert. ///
return byte[]

Encode() public static method

Converts an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-58 characters.
public static Encode ( byte bytes ) : string
bytes byte /// An array of 8-bit unsigned integers. ///
return string

FromBase58() public static method

Converts the specified string, which encodes binary data as base 58 digits, to an equivalent 8-bit unsigned integer array.
public static FromBase58 ( this s ) : byte[]
s this /// The base 58 string to convert. ///
return byte[]

ToBase58() public static method

Converts an array of 8-bit unsigned integers to its equivalent string representation that is encoded with base-58 digits.
public static ToBase58 ( this bytes ) : string
bytes this /// An array of 8-bit unsigned integers. ///
return string