marshalling

package
v1.1.13 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2022 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package marshalling provides a common implementation of (un)marshalling method using Writer and Reader.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GroupNew

func GroupNew(g kyber.Group, t reflect.Type) interface{}

GroupNew is the Default implementation of reflective constructor for Group

func PointMarshalTo

func PointMarshalTo(p kyber.Point, w io.Writer) (int, error)

PointMarshalTo provides a generic implementation of Point.EncodeTo based on Point.Encode.

func PointUnmarshalFrom

func PointUnmarshalFrom(p kyber.Point, r io.Reader) (int, error)

PointUnmarshalFrom provides a generic implementation of Point.DecodeFrom, based on Point.Decode, or Point.Pick if r is a Cipher or cipher.Stream. The returned byte-count is valid only when decoding from a normal Reader, not when picking from a pseudorandom source.

func ScalarMarshalTo

func ScalarMarshalTo(s kyber.Scalar, w io.Writer) (int, error)

ScalarMarshalTo provides a generic implementation of Scalar.EncodeTo based on Scalar.Encode.

func ScalarUnmarshalFrom

func ScalarUnmarshalFrom(s kyber.Scalar, r io.Reader) (int, error)

ScalarUnmarshalFrom provides a generic implementation of Scalar.DecodeFrom, based on Scalar.Decode, or Scalar.Pick if r is a Cipher or cipher.Stream. The returned byte-count is valid only when decoding from a normal Reader, not when picking from a pseudorandom source.

Types

This section is empty.

Jump to

Keyboard shortcuts

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