util

package
v0.0.0-...-c6538f3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HexStrToInt

func HexStrToInt(pk *key.PublicKey, s string) (*num.Int, error)

Hex String to Paillier.Int

func IntToHexStr

func IntToHexStr(value *num.Int) (string, error)

Paillier.Int to Hex String

func MarshalPrivateKey

func MarshalPrivateKey(sk *key.PrivateKey) ([]byte, error)

func MarshalPublicKey

func MarshalPublicKey(pk *key.PublicKey) ([]byte, error)

func MarshalPublicKeyHex

func MarshalPublicKeyHex(pk *key.PublicKey) (string, error)

func ReadPrivateKeyFromPem

func ReadPrivateKeyFromPem(skPem []byte) (*key.PrivateKey, error)

func ReadPublicKeyFromPem

func ReadPublicKeyFromPem(pkPem []byte) (*key.PublicKey, error)

func UnmarshalPrivateKey

func UnmarshalPrivateKey(asn1Data []byte) (*key.PrivateKey, error)

func UnmarshalPublicKey

func UnmarshalPublicKey(asn1Data []byte) (*key.PublicKey, error)

func UnmarshalPublicKeyHex

func UnmarshalPublicKeyHex(asn1Hex string) (*key.PublicKey, error)

func WritePrivateKeyToPem

func WritePrivateKeyToPem(key *key.PrivateKey) ([]byte, error)

func WritePublicKeyToPem

func WritePublicKeyToPem(key *key.PublicKey) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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