rsa

package
v0.0.0-...-3d1188e Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PCryptoRsa           = Rsa{/* contains filtered or unexported fields */}
	PCryptoRsaChunks     = Rsa{/* contains filtered or unexported fields */}
	PCryptoRsaCert       = RsaCert{/* contains filtered or unexported fields */}
	PCryptoRsaCertChunks = RsaCert{/* contains filtered or unexported fields */}
)

Functions

This section is empty.

Types

type Rsa

type Rsa struct {
	// contains filtered or unexported fields
}

func (Rsa) Decrypt

func (r Rsa) Decrypt(ciphertext []byte, key []byte) (data []byte, err error)

func (Rsa) Encrypt

func (r Rsa) Encrypt(plaintext []byte, key []byte) (data []byte, err error)

func (Rsa) GenRsaKey

func (r Rsa) GenRsaKey(bits int) (public, private []byte, err error)

func (Rsa) IsSymmetric

func (r Rsa) IsSymmetric() bool

func (Rsa) Name

func (r Rsa) Name() string

type RsaCert

type RsaCert struct {
	// contains filtered or unexported fields
}

func (RsaCert) Decrypt

func (r RsaCert) Decrypt(ciphertext []byte, key []byte) (data []byte, err error)

func (RsaCert) Encrypt

func (r RsaCert) Encrypt(plaintext []byte, key []byte) (data []byte, err error)

func (RsaCert) GenRsaCert

func (r RsaCert) GenRsaCert(bits int, template *x509.Certificate) (cert, key []byte, err error)

func (RsaCert) IsSymmetric

func (r RsaCert) IsSymmetric() bool

func (RsaCert) Name

func (r RsaCert) Name() string

func (RsaCert) Sign

func (r RsaCert) Sign(plaintext []byte, key []byte) (hashText []byte, sign []byte, err error)

func (RsaCert) Verify

func (r RsaCert) Verify(hashText []byte, sign []byte, key []byte) (ok bool, err error)

Jump to

Keyboard shortcuts

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