Documentation ¶
Index ¶
- type User
- func (myUser *User) Authenticate() (bool, error)
- func (u *User) GeneratePlainKeyPair() (*models.PlainKeyPair, error)
- func (myUser *User) GetPrivateKey() (*rsa.PrivateKey, error)
- func (myUser *User) GetPublicKey() (*rsa.PublicKey, error)
- func (myUser *User) NewUserKeys() (*UserKeys, error)
- func (myUser *User) SignUp() error
- func (myUser *User) UserExist() (bool, error)
- type UserKeys
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type User ¶
func (*User) Authenticate ¶
Authenticate allows to auth a user
func (*User) GeneratePlainKeyPair ¶
func (u *User) GeneratePlainKeyPair() (*models.PlainKeyPair, error)
func (*User) GetPrivateKey ¶
func (myUser *User) GetPrivateKey() (*rsa.PrivateKey, error)
GetPrivateKey decrypts the private key using the key which has encrypted it, and returns it
func (*User) GetPublicKey ¶
GetPublicKey return public key
func (*User) NewUserKeys ¶
NewUserKeys builds a UserKeys object. It uses a hash512 of the user's password, to encrypt the private key
Click to show internal directories.
Click to hide internal directories.