paracentric

package module
v0.0.0-...-2789789 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: MPL-2.0 Imports: 26 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

paracentric

Basic PKI infrastructure with optional WASM support

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CertReadError error = errors.New("Error decoding certificate")
View Source
var CrtGenError error = errors.New("Failed to generate certificate")
View Source
var CsrGenError error = errors.New("Failed to generate certificate request")
View Source
var CsrNotSupportedPubKeyError error = errors.New("Csr not supported public key error")
View Source
var CsrParseError error = errors.New("Failed to parse certificate request")
View Source
var CsrSigError error = errors.New("CSR signature invalid")
View Source
var Goose goose.Alert = goose.Alert(1)
View Source
var KeyReadError error = errors.New("Error decoding key")
View Source
var KeyWrongTypeError error = errors.New("Error wrong type key")
View Source
var MailOrUrlNeededError error = errors.New("Mail or URL needed")
View Source
var MailParseError error = errors.New("Mail parse error")
View Source
var MarshalPubKeyError error = errors.New("Marshal public key error")
View Source
var PrivGenError error = errors.New("Failed to generate private key")
View Source
var SerialGenError error = errors.New("Failed to generate serial number")
View Source
var UrlParseError error = errors.New("URL parse error")

Functions

This section is empty.

Types

type ChallImageT

type ChallImageT struct {
	gozxing.BitMatrix
}

func (ChallImageT) At

func (ci ChallImageT) At(x, y int) color.Color

func (ChallImageT) ColorModel

func (ci ChallImageT) ColorModel() color.Model

type PkiT

type PkiT struct {
	Cert *x509.Certificate
	PK   *rsa.PrivateKey
}

func New

func New() *PkiT

func (*PkiT) Certificate

func (pk *PkiT) Certificate() []byte

func (*PkiT) Challenge

func (pk *PkiT) Challenge() ([]byte, []byte, error)

func (*PkiT) Decrypt

func (pk *PkiT) Decrypt(secret []byte) ([]byte, error)

func (*PkiT) Encrypt

func (pk *PkiT) Encrypt(msg []byte) ([]byte, error)

func (*PkiT) GenerateClient

func (pk *PkiT) GenerateClient(asn1Data []byte) (*x509.Certificate, *rsa.PublicKey, error)

func (*PkiT) GenerateClientCSR

func (pk *PkiT) GenerateClientCSR(subject pkix.Name, email string) ([]byte, error)

func (*PkiT) NewPemCert

func (pk *PkiT) NewPemCert(fname string) error

func (*PkiT) NewPemCertFromFile

func (pk *PkiT) NewPemCertFromFile(fname string) error

func (*PkiT) NewPemCertFromMemory

func (pk *PkiT) NewPemCertFromMemory(buf []byte) error

func (*PkiT) NewPemCertFromReader

func (pk *PkiT) NewPemCertFromReader(rd io.Reader) error

func (*PkiT) NewPemCertReqFromReader

func (pk *PkiT) NewPemCertReqFromReader(rd io.Reader) error

func (*PkiT) NewPemKeyFromFile

func (pk *PkiT) NewPemKeyFromFile(fname string, password string) error

func (*PkiT) NewPemKeyFromMemory

func (pk *PkiT) NewPemKeyFromMemory(buf []byte, password string) error

func (*PkiT) NewPemKeyFromReader

func (pk *PkiT) NewPemKeyFromReader(rd io.Reader, password string) error

func (*PkiT) PemCsr

func (pk *PkiT) PemCsr(der []byte, fname string) error

func (*PkiT) PemKey

func (pk *PkiT) PemKey(password string) ([]byte, error)

func (*PkiT) PemKeyToFile

func (pk *PkiT) PemKeyToFile(fname, password string) error

func (*PkiT) QrKeyId

func (pk *PkiT) QrKeyId(keyId string, challenge []byte) ([]byte, error)

func (*PkiT) Sign

func (pk *PkiT) Sign(msg string) ([]byte, error)

func (*PkiT) Verify

func (pk *PkiT) Verify(msg string, signature []byte) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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