Object

fm.common

Base58

Related Doc: package common

Permalink

object Base58 extends BaseEncoding

Base58 is a way to encode Bitcoin addresses (or arbitrary data) as alphanumeric strings.

Note that this is not the same base58 as used by Flickr, which you may find referenced around the Internet.

You may want to consider working with PrefixedChecksummedBytes instead, which adds support for testing the prefix and suffix bytes commonly found in addresses.

Satoshi explains: why base-58 instead of standard base-64 encoding?

However, note that the encoding/decoding runs in O(n²) time, so it is not useful for large data.

The basic idea of the encoding is to treat the data bytes as a large number represented using base-256 digits, convert the number to be represented using base-58 digits, preserve the exact number of leading zeros (which are otherwise lost during the mathematical operations on the numbers), and finally represent the resulting base-58 digits as alphanumeric ASCII characters.

Linear Supertypes
BaseEncoding, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Base58
  2. BaseEncoding
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @throws( ... )
  6. def decode(input: CharSequence): Array[Byte]

    Permalink

    Decodes the given base58 string into the original data bytes.

    Decodes the given base58 string into the original data bytes.

    input

    the base58-encoded string to decode

    returns

    the decoded data bytes

    Definition Classes
    Base58BaseEncoding
  7. def decode(input: Array[Char]): Array[Byte]

    Permalink
    Definition Classes
    Base58BaseEncoding
  8. def decode(input: ByteBuffer): ByteBuffer

    Permalink
    Definition Classes
    Base58BaseEncoding
  9. def decode(input: Array[Byte]): Array[Byte]

    Permalink
    Definition Classes
    Base58BaseEncoding
  10. def encode(input: Array[Byte]): String

    Permalink

    Encodes the given bytes as a base58 string (no checksum is appended).

    Encodes the given bytes as a base58 string (no checksum is appended).

    input

    the bytes to encode

    returns

    the base58-encoded string

    Definition Classes
    Base58BaseEncoding
  11. def encode(bytes: Array[Byte], offset: Int, length: Int): String

    Permalink
    Definition Classes
    Base58BaseEncoding
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate()
  16. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate()
  20. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  21. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  22. final def tryDecode(data: CharSequence): Option[Array[Byte]]

    Permalink
    Definition Classes
    BaseEncoding
  23. final def tryDecode(data: Array[Char]): Option[Array[Byte]]

    Permalink
    Definition Classes
    BaseEncoding
  24. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @Deprecated @deprecated @throws( classOf[java.lang.Throwable] )
    Deprecated

    (Since version ) see corresponding Javadoc for more information.

Inherited from BaseEncoding

Inherited from AnyRef

Inherited from Any

Ungrouped