asymmetric

package
v1.6.15 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2024 License: MIT Imports: 12 Imported by: 3

Documentation

Overview

Package asymmetric is a wrapper on standard Go package - rsa.

The package also adds an additional interface for working with a list of public keys.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IListPubKeys added in v1.5.6

type IListPubKeys interface {
	InPubKeys(IPubKey) bool
	GetPubKeys() []IPubKey
	AddPubKey(IPubKey)
	DelPubKey(IPubKey)
}

func NewListPubKeys added in v1.5.6

func NewListPubKeys() IListPubKeys

type IPrivKey

type IPrivKey interface {
	crypto.IDecrypter
	types.IConverter
	GetSize() uint64

	SignBytes([]byte) []byte
	GetPubKey() IPubKey
}

func LoadRSAPrivKey

func LoadRSAPrivKey(pPrivKey interface{}) IPrivKey

func NewRSAPrivKey

func NewRSAPrivKey(pBits uint64) IPrivKey

Create private key by number of bits.

type IPubKey

type IPubKey interface {
	crypto.IEncrypter
	types.IConverter
	GetSize() uint64

	GetHasher() hashing.IHasher
	VerifyBytes([]byte, []byte) bool
}

func LoadRSAPubKey

func LoadRSAPubKey(pPubKey interface{}) IPubKey

Jump to

Keyboard shortcuts

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