Show / Hide Table of Contents

Class Base58

A codec for IPFS Base-58.

Inheritance
Object
Base58
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Ipfs
Assembly: Ipfs.Core.dll
Syntax
public static class Base58
Remarks

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

This is just thin wrapper of https://github.com/ssg/SimpleBase.

This codec uses the BitCoin alphabet not Flickr's.

Methods

| Improve this Doc View Source

Decode(String)

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

Declaration
public static byte[] Decode(string s)
Parameters
Type Name Description
String s

The base 58 string to convert.

Returns
Type Description
Byte[]

An array of 8-bit unsigned integers that is equivalent to s.

| Improve this Doc View Source

Encode(Byte[])

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

Declaration
public static string Encode(byte[] bytes)
Parameters
Type Name Description
Byte[] bytes

An array of 8-bit unsigned integers.

Returns
Type Description
String

The string representation, in base 58, of the contents of bytes.

| Improve this Doc View Source

FromBase58(String)

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

Declaration
public static byte[] FromBase58(this string s)
Parameters
Type Name Description
String s

The base 58 string to convert.

Returns
Type Description
Byte[]

An array of 8-bit unsigned integers that is equivalent to s.

| Improve this Doc View Source

ToBase58(Byte[])

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

Declaration
public static string ToBase58(this byte[] bytes)
Parameters
Type Name Description
Byte[] bytes

An array of 8-bit unsigned integers.

Returns
Type Description
String

The string representation, in base 58, of the contents of bytes.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX