encoding

package
v0.0.0-...-ffb7191 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2019 License: MPL-2.0 Imports: 5 Imported by: 3

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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