newcrypto

package
v0.0.0-...-189d72e Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2016 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const BlockSize = 128
View Source
const SIZEOF_INT32 = 4 // bytes

Variables

This section is empty.

Functions

func AsDwordSlice

func AsDwordSlice(bytes []byte) []uint32

func Encrypt

func Encrypt(input []byte, msSinceStart uint32) []byte

func Hash32

func Hash32(buffer []byte) uint32

func Hash32Salt

func Hash32Salt(buffer []byte, salt uint32) uint32

func Hash64

func Hash64(buffer []byte) uint64

func Hash64Salt

func Hash64Salt(buffer []byte, salt uint32) uint64

func Hash64Salt64

func Hash64Salt64(buffer []byte, salt uint64) uint64

a

func RandomBytes

func RandomBytes(n int) []byte

Types

type HashRequest

type HashRequest struct {
	HashType   int
	Lat        float64
	Lng        float64
	Alt        float64
	AuthTicket []byte
	Request    []byte

	Result chan uint64
}

type PogoSignature

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

func NewPogoSignature

func NewPogoSignature() *PogoSignature

func (*PogoSignature) Hash25

func (ps *PogoSignature) Hash25() int64

func (*PogoSignature) HashLocation1

func (ps *PogoSignature) HashLocation1(authTicket []byte, lat, lng, alt float64) uint32

func (*PogoSignature) HashLocation2

func (ps *PogoSignature) HashLocation2(lat, lng, alt float64) uint32

func (*PogoSignature) HashRequest

func (ps *PogoSignature) HashRequest(authTicket, request []byte) uint64

func (*PogoSignature) ProcessSignatureRequests

func (ps *PogoSignature) ProcessSignatureRequests() error

type Uint128

type Uint128 [2]uint64 // { high, low }

func (Uint128) Add

func (a Uint128) Add(b Uint128) Uint128

addition

func (Uint128) And

func (a Uint128) And(b Uint128) Uint128

bitwise and

func (Uint128) Cmp

func (a Uint128) Cmp(b Uint128) int

compare

Jump to

Keyboard shortcuts

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