C# Class BitSharper.Base58

A custom form of base58 is used to encode BitCoin addresses. Note that this is not the same base58 as used by Flickr, which you may see reference to around the internet.
Satoshi says: why base-58 instead of standard base-64 encoding?

  • Don't want 0OIl characters that look the same in some fonts and could be used to create visually identical looking account numbers.
  • A string with non-alphanumeric characters is not as easily accepted as an account number.
  • E-mail usually won't line-break if there's no punctuation to break at.
  • Double clicking selects the whole number as one word if it's all alphanumeric.
Datei anzeigen Open project: TangibleCryptography/BitSharper

Public Methods

Method Description
Decode ( string input ) : byte[]
DecodeChecked ( string input ) : byte[]

Uses the checksum in the last 4 bytes of the decoded data to verify the rest are correct. The checksum is removed from the returned data.

DecodeToBigInteger ( string input ) : BigInteger
Encode ( byte input ) : string

Method Details

Decode() public static method

public static Decode ( string input ) : byte[]
input string
return byte[]

DecodeChecked() public static method

Uses the checksum in the last 4 bytes of the decoded data to verify the rest are correct. The checksum is removed from the returned data.
If the input is not base 58 or the checksum does not validate.
public static DecodeChecked ( string input ) : byte[]
input string
return byte[]

DecodeToBigInteger() public static method

public static DecodeToBigInteger ( string input ) : BigInteger
input string
return Org.BouncyCastle.Math.BigInteger

Encode() public static method

public static Encode ( byte input ) : string
input byte
return string