pgpwordlist

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2016 License: ISC Imports: 4 Imported by: 0

README

pgpwordlist

This package provides the pgpwordlist for use when generating a human readable hash or seed as well as functions for working with it.

Installation and updating

$ go get -u github.com/decred/dcrwallet/pgpwordlist

Documentation

Overview

Package pgpwordlist provides the pgpwordlist for easier hashes/seeds.

This package provides the pgpwordlist for use when generating a human readable hash or seed as well as functions for working with it.

Index

Constants

This section is empty.

Variables

View Source
var PGPWordList = strings.Split(pgpWordList, "\n")

PGPWordList as a slice.

View Source
var WordList = PGPWordList

WordList to use.

View Source
var WordMap = pgpWordMap

WordMap is the mapping of WordList to the values.

Functions

func ToBytes

func ToBytes(s string) ([]byte, error)

ToBytes converts a string to a byte slice using the PGP word list. Notably, it strips words of their case, so any case input is valid.

func ToBytesChecksum

func ToBytesChecksum(s string) ([]byte, error)

ToBytesChecksum converts a string to a byte slice using the PGP word list. Notably, it strips words of their case, so any case input is valid. Unlike ToBytes, it uses a sha256d hash to verify the integrity of the data after.

func ToString

func ToString(b []byte) (string, error)

ToString converts a byteslice to a string of words from the PGP word list.

func ToStringChecksum

func ToStringChecksum(b []byte) (string, error)

ToStringChecksum converts a byteslice to a string of words from the PGP word list, along with a one word checksum appended to the end. The checksum is the first byte of the sha256d hash.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL