pdfs

package
v0.0.0-...-4c03c20 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecryptWithPrivateKey

func DecryptWithPrivateKey(ct []byte, priv *rsa.PrivateKey) ([]byte, error)

func EncryptPDF

func EncryptPDF(path string) error

func EncryptPDFDirectory

func EncryptPDFDirectory(p string) error

func EncryptWithPublicKey

func EncryptWithPublicKey(msg []byte, pub *rsa.PublicKey) ([]byte, error)

func GenerateIndex

func GenerateIndex(root string) error

func GetCert

func GetCert() (*x509.Certificate, error)

func GetPDFPassword

func GetPDFPassword() (string, error)

func GetPDFSizes

func GetPDFSizes() (map[string]int64, error)

func GetPassword

func GetPassword() (string, error)

func GetPrivateKey

func GetPrivateKey() (*rsa.PrivateKey, error)

func GetReadSeeker

func GetReadSeeker(file *os.File) *bytes.Reader

func IsEarly

func IsEarly(cert *x509.Certificate) bool

func IsExpired

func IsExpired(cert *x509.Certificate) bool

func LoadIndex

func LoadIndex() (*searchtree.BinarySearchTree, error)

func SaveCert

func SaveCert(keypath string, c X509) error

func SaveEncryptionFiles

func SaveEncryptionFiles() error

func SaveFile

func SaveFile(path string, content *bytes.Buffer) error

Types

type X509

type X509 struct {
	Certificate *bytes.Buffer
	PrivateKey  *bytes.Buffer
	PublicKey   *rsa.PublicKey
}

func GenerateCert

func GenerateCert() (X509, error)

Jump to

Keyboard shortcuts

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