Options
All
  • Public
  • Public/Protected
  • All
Menu

Module crypto/lib

Index

Variables

Const base58

base58: BaseConverter

Functions

ensureBuffer

  • ensureBuffer(message: string | Buffer | any): false | Buffer
  • Ensure message is in buffer format.

    Parameters

    • message: string | Buffer | any

      any string.

    Returns false | Buffer

    Returns Buffer.

hash160

  • hash160(message: Buffer): any
  • Get hash160 of message.

    Parameters

    • message: Buffer

      message in string or Buffer.

    Returns any

    Returns the hash160 of a string.

isHex

  • isHex(hex: string): boolean

padHexStart

  • padHexStart(hex: string, lengthBytes?: number): string
  • Pad a hex string with '0'

    Parameters

    • hex: string

      The hex string to pad.

    • Optional lengthBytes: number

      The length of the final string in bytes

    Returns string

    Returns a padded string with length greater or equal to the given length rounded up to the nearest even number.

ripemd160

  • ripemd160(message: string | Buffer): any
  • Get ripemd160 of message.

    Parameters

    • message: string | Buffer

      message in string or Buffer.

    Returns any

    Returns the ripemd160 of a string.

sha256

  • sha256(message: string | Buffer): any
  • Get sha256 of message.

    Parameters

    • message: string | Buffer

      message in string or Buffer.

    Returns any

    Returns the sha256 of a string.

Generated using TypeDoc