pgpwordlist

package
v0.0.0-...-969b8fa Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2016 License: ISC Imports: 4 Imported by: 0

Documentation

Overview

Package pgpwordlist implements conversion functions for the PGP word list.

Index

Constants

This section is empty.

Variables

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

The PGP wordlist, as a slice.

View Source
var WordList = PGPWordList

The wordlists to use.

View Source
var WordMap = pgpWordMap

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