Documentation ¶
Index ¶
Constants ¶
View Source
const ( //SALTBYTE salt size SALTBYTE = 32 //KeysPath server and users encryption key path KeysPath = "./services/pwencrypter/keys" )
Variables ¶
This section is empty.
Functions ¶
func CheckError ¶
func CheckError(err error)
CheckError Checks if err is not nil then it logs the error
func Decrypt ¶
Decrypt Func decrypt passwords of the user basing on the user key This Function takes ciphertext which is the encrypted password & key = k as inputs returns the decrypted password as a string
func Encrypt ¶
Encrypt Func encrypt passwords of the user basing on a key that the user have generated before This Function takes password as a string type & key = k as a []byte type as inputs returns encrypted password as byte array
func GenKeyP ¶
GenKeyP func generate an encryption key from user password Takes password as an input and returns byte slice
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.