vrf

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Copyright © 2019 Annchain Authors <EMAIL ADDRESS>

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vrf

type Vrf struct {
}

func (*Vrf) GenerateVrf

func (as *Vrf) GenerateVrf() *VrfInfo

func (*Vrf) VerifyVrfData

func (as *Vrf) VerifyVrfData(data []byte) error

func (*Vrf) VrfCondition

func (as *Vrf) VrfCondition(Vrf []byte) bool

func (*Vrf) VrfVerify

func (as *Vrf) VrfVerify(Vrf []byte, pk []byte, data []byte, proof []byte) (err error)

type VrfData

type VrfData struct {
	SeqHash types.Hash
	Height  uint64
	TxNum   int
}

func (*VrfData) DecodeMsg

func (z *VrfData) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*VrfData) EncodeMsg

func (z *VrfData) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*VrfData) MarshalMsg

func (z *VrfData) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*VrfData) Msgsize

func (z *VrfData) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*VrfData) UnmarshalMsg

func (z *VrfData) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

type VrfInfo

type VrfInfo struct {
	Message   []byte
	Proof     []byte
	PublicKey []byte
	Vrf       []byte
}

func (*VrfInfo) DecodeMsg

func (z *VrfInfo) DecodeMsg(dc *msgp.Reader) (err error)

DecodeMsg implements msgp.Decodable

func (*VrfInfo) EncodeMsg

func (z *VrfInfo) EncodeMsg(en *msgp.Writer) (err error)

EncodeMsg implements msgp.Encodable

func (*VrfInfo) MarshalMsg

func (z *VrfInfo) MarshalMsg(b []byte) (o []byte, err error)

MarshalMsg implements msgp.Marshaler

func (*VrfInfo) Msgsize

func (z *VrfInfo) Msgsize() (s int)

Msgsize returns an upper bound estimate of the number of bytes occupied by the serialized message

func (*VrfInfo) String

func (v *VrfInfo) String() string

func (*VrfInfo) UnmarshalMsg

func (z *VrfInfo) UnmarshalMsg(bts []byte) (o []byte, err error)

UnmarshalMsg implements msgp.Unmarshaler

Jump to

Keyboard shortcuts

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