v3go.dedis.ch/kyber/v3/util/encoding Index | Files

package encoding

import "go.dedis.ch/kyber/v3/util/encoding"

Package encoding package provides helper functions to encode/decode a Point/Scalar in hexadecimal.

Index

Functions

func PointToStringHex

func PointToStringHex(group kyber.Group, point kyber.Point) (string, error)

PointToStringHex converts a point to a hexadecimal representation

func ReadHexPoint

func ReadHexPoint(group kyber.Group, r io.Reader) (kyber.Point, error)

ReadHexPoint reads a point from r in hex representation.

func ReadHexScalar

func ReadHexScalar(group kyber.Group, r io.Reader) (kyber.Scalar, error)

ReadHexScalar takes a hex-encoded scalar and returns that scalar, optionally an error

func ScalarToStringHex

func ScalarToStringHex(group kyber.Group, scalar kyber.Scalar) (string, error)

ScalarToStringHex encodes a scalar to hexadecimal.

func StringHexToPoint

func StringHexToPoint(group kyber.Group, s string) (kyber.Point, error)

StringHexToPoint reads a hexadecimal representation of a point from a string.

func StringHexToScalar

func StringHexToScalar(group kyber.Group, str string) (kyber.Scalar, error)

StringHexToScalar reads a scalar in hexadecimal from string

func WriteHexPoint

func WriteHexPoint(group kyber.Group, w io.Writer, point kyber.Point) error

WriteHexPoint writes a point in hex representation to w.

func WriteHexScalar

func WriteHexScalar(group kyber.Group, w io.Writer, scalar kyber.Scalar) error

WriteHexScalar converts a scalar key to a hex-string

Source Files

encoding.go

Version
v3.1.0 (latest)
Published
Nov 30, 2022
Platform
linux/amd64
Imports
5 packages
Last checked
1 month ago

Tools for package owners.