Documentation ¶
Index ¶
- Constants
- func GenerateRandomKey() []byte
- type Crypter
- type Store
- func (store *Store) CreateUser(login, password string) (u *User, e error)
- func (store *Store) CreateUserWithBits(login, password string, bits int) (u *User, e error)
- func (store *Store) LoadPublicKeyForUser(login string) (key *rsa.PublicKey, e error)
- func (store *Store) Read(login string, secret string) (b []byte, e error)
- func (store *Store) Store(blob []byte, login string) error
- func (store *Store) StoreFileForUser(login, name string, payload []byte, options *StoreOptions) (e error)
- func (store *Store) UserExist(login string) bool
- func (store *Store) UserPath(login string) string
- func (store *Store) Users() (users []*User, e error)
- type StoreOptions
- type User
Constants ¶
View Source
const DefaultBits = 4096
Variables ¶
This section is empty.
Functions ¶
func GenerateRandomKey ¶
func GenerateRandomKey() []byte
Types ¶
type Store ¶
type Store struct {
Root string
}
func (*Store) CreateUser ¶
func (*Store) CreateUserWithBits ¶
password needs to have a valid length
func (*Store) LoadPublicKeyForUser ¶
func (*Store) StoreFileForUser ¶
func (store *Store) StoreFileForUser(login, name string, payload []byte, options *StoreOptions) (e error)
type StoreOptions ¶
Click to show internal directories.
Click to hide internal directories.