Documentation ¶
Index ¶
- func AESDecryptBytes(ciphertext []byte, password string) ([]byte, error)
- func AESEncryptBytes(plaintext []byte, pw string) ([]byte, error)
- func DecryptWithPrivateKey(ct []byte, priv *rsa.PrivateKey) ([]byte, error)
- func EncryptPDF(path string, userPW string) error
- func EncryptPDFDirectory(p string, pw string) error
- func EncryptWithPublicKey(msg []byte, pub *rsa.PublicKey) ([]byte, error)
- func GenerateIndex(root string) error
- func GetCert() (*x509.Certificate, error)
- func GetKey(password string, salt []byte) ([]byte, []byte, error)
- func GetPDFPassword(pw []byte) (string, error)
- func GetPDFSizes() (map[string]int64, error)
- func GetPassword() (string, error)
- func GetPrivateKey(password string) (*rsa.PrivateKey, error)
- func GetReadSeeker(file *os.File) *bytes.Reader
- func IsEarly(cert *x509.Certificate) bool
- func IsExpired(cert *x509.Certificate) bool
- func LoadIndex() (*searchtree.BinarySearchTree, error)
- func PasswordPrompt() (*string, error)
- func PrepareAES(key []byte) (cipher.AEAD, error)
- func PromptUser(save bool) (string, error)
- func SaveCert(keypath string, c X509) error
- func SaveEncryptionFiles(password string) error
- func SaveFile(path string, content *bytes.Buffer) error
- type X509
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 EncryptPDFDirectory ¶
func EncryptWithPublicKey ¶
func GenerateIndex ¶
func GetCert ¶
func GetCert() (*x509.Certificate, error)
func GetPDFPassword ¶
func GetPDFSizes ¶
func GetPassword ¶
func GetPrivateKey ¶
func GetPrivateKey(password string) (*rsa.PrivateKey, error)
func IsEarly ¶
func IsEarly(cert *x509.Certificate) bool
func IsExpired ¶
func IsExpired(cert *x509.Certificate) bool
func LoadIndex ¶
func LoadIndex() (*searchtree.BinarySearchTree, error)
func PasswordPrompt ¶
func PromptUser ¶
func SaveEncryptionFiles ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.