package
Version:
v0.0.0-...-9ca5070
Opens a new window with list of versions in this module.
Published: Apr 11, 2021
License: Apache-2.0
Opens a new window with license information.
Imports: 1
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type PlainKeyPair struct {
PrivateKey []byte `json:"privateKey"`
PublicKey []byte `json:"publicKey"`
}
type User struct {
Username string `json:"username"`
Password string `json:"password"`
}
User defines a user in db
NewUser instanciates a user object
type UserKeys struct {
Username string `json:"username"`
EncPrivateKey [][]byte `json:"encPrivateKey"`
PublicKey []byte `json:"publicKey"`
}
UserKeys holds the RSA of a user
NewUserKeys builds a UserKeys object. It uses a hash512 of the user's password, to encrypt the private key
Source Files
¶
Click to show internal directories.
Click to hide internal directories.