Documentation ¶
Index ¶
- func Bytes(n int) (error, []byte)
- func FindFileInDirectory(dir, fn string) (error, string)
- func PKCS5Pad(data []byte, bs int) []byte
- func PKCS5Trim(data []byte) []byte
- type File
- func (f *File) DecryptCBC(obj Object) error
- func (f *File) DecryptGCM(obj Object, ad []byte) error
- func (f *File) DecryptOAEP(obj Object, l []byte) error
- func (f *File) EncryptCBC(obj Object) error
- func (f *File) EncryptGCM(obj Object, ad []byte) error
- func (f *File) EncryptOAEP(obj Object, l []byte) error
- type FileList
- type Object
- func (o Object) DecryptCBC(iv, ct []byte) []byte
- func (o Object) DecryptGCM(n, ct, ad []byte) []byte
- func (o Object) DecryptOAEP(ct, l []byte) (error, []byte)
- func (o Object) EncryptCBC(pt []byte) ([]byte, []byte)
- func (o Object) EncryptGCM(pt, ad []byte) ([]byte, []byte)
- func (o Object) EncryptOAEP(pt, l []byte) (error, []byte)
- func (o Object) Export() []byte
- func (o Object) Hash(salt, pt []byte) []byte
- func (o Object) Sign(pt []byte) (error, []byte)
- func (o Object) Verify(pt, s []byte) (error, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindFileInDirectory ¶
FindFileInDirectory takes a directory and a filename and returns the relitive path of that file if exists
Types ¶
type File ¶
type File struct {
Name string
}
func (*File) DecryptCBC ¶
DecryptCBC decrypts a file with AES-CBC-256 using the given Object
func (*File) EncryptCBC ¶
EncryptCBC encrypts a file with AES-CBC-256 using the given Object
type FileList ¶
type FileList struct {
Files []File
}
FileList allows iterability and discovery. Also manages key
func DiscoverFilesInDirectory ¶
DiscoverFilesInDirectory automates discovery of files in directory and returns FileList
func FindFilesByTypeInDirectory ¶
FindFilesByTypeInDirectory returns the relative path of all files in the directory of a specific extension
type Object ¶
type Object struct { BlockKey []byte RSAKey *rsa.PrivateKey }
func (Object) DecryptCBC ¶
func (Object) DecryptGCM ¶
DecryptGCM using AES-GCM-256 with RSA Signature of component of RSA private key as associated data
func (Object) EncryptGCM ¶
EncryptGCM using AES-GCM-256 with RSA Signature of component of RSA private key as associated data