ppp

package module
v0.0.0-...-f72388a Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2013 License: MIT Imports: 4 Imported by: 0

README

Perfect Paper Passwords

A PPP implementation in go based on John Graham-Cumming's C implementation of Steve Gibsons https://www.grc.com/ppp.htm PPP algorithm.

License: MIT

Documentation

Overview

Copyright (c) 2012 Jens Zeilund (http://sketchground.dk)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertHexToKey

func ConvertHexToKey(sequenceKey string) ([]byte, error)

ConvertHexToKey converts a hex string into a byte array.

func GenerateSequenceKeyFromString

func GenerateSequenceKeyFromString(passPhrase string) []byte

GenerateSequenceKeyFromString procudes a valid sequenceKey(sha hash) based on a passPhrase.

Types

type Ppp

type Ppp struct {
	// contains filtered or unexported fields
}

func NewPpp

func NewPpp(sequenceKey []byte, alphabet string, passcodeLength, codesPerCard int) *Ppp

NewPpp creates a new perfect paper passwords struct based on the given sequence key, alphabet and passcodeLength.

func (*Ppp) GetPasscode

func (ppp *Ppp) GetPasscode(num *big.Int) string

GetPasscode returns passcode num.

func (*Ppp) GetPasscodes

func (ppp *Ppp) GetPasscodes(firstPasscode *big.Int, count int) []string

GetPasscodes Retrieves a range of passcodes from firstPasscode.

Jump to

Keyboard shortcuts

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