Giter Site home page Giter Site logo

base58check's Introduction

Base58Check

Base58Check is a C# implementation of Base58 Checked Encoding, based on a public domain Gist by @CodesInChaos.

In short, Base58 is a encoding algorithm similar to Base64, removing certain characters that cause issues with URLs, and cause confusion because of how similar they look in certain fonts. Base58Check adds a 4 byte checksum to validate that the data hasn't been altered in transmission. This checksum isn't suitable to perform cryptographic validation, but is does detect accidental corruption.

Want to support development? Consider donating via Bitcoin to 14jumFDmuVkLiAt4TgyKt17SWHtPRbkcLr - all donations, no matter how small are appreciated.

Installation

NuGet Package

Public Interface

  • Base58Check.Encode(byte[]) - Encodes data with a 4-byte checksum
  • Base58Check.Decode(string) - Decodes data in Base58Check format (with 4 byte checksum)
  • Base58Check.EncodePlain(byte[]) - Encodes data in plain Base58, without any checksum
  • Base58Check.DecodePlain(string) - Decodes data in plain Base58, without any checksum

The Encode* methods both expect a byte array of arbitrary length; as the entire payload to encode must be loaded into memory, an OutOfMemoryException may be thrown for large payloads. The Decode* methods will throw a FormatException if the string passed in isn't in a valid Base58 format; the Decode method will also throw the FormatException if the checksum verification fails.

License

This software is released to the public domain.

See LICENSE for more information.

base58check's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.