diff options
author | rsiddharth <s@ricketyspace.net> | 2021-02-24 18:30:14 -0500 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2021-02-24 18:30:14 -0500 |
commit | 5312ff721fe74a8d2a4085bfd331680b497ea043 (patch) | |
tree | 7c1594f9ae82541fc83af589ea5309a4b9e35440 /lib | |
parent | 9d96d7e781710b306cf40828e35843656ddfe72e (diff) |
lib: update webSessionEncryptionKey
Use RandomBytes to set `webSessionEncryptionKey`
Diffstat (limited to 'lib')
-rw-r--r-- | lib/web.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -3,16 +3,16 @@ package lib -import "crypto/rand" - type Profile map[string]string -var webSessionEncryptionKey []byte = make([]byte, 16) +var webSessionEncryptionKey []byte var webUidCounter int64 var webUserProfiles map[string]Profile = make(map[string]Profile, 0) func init() { - _, err := rand.Read(webSessionEncryptionKey) + var err error + + webSessionEncryptionKey, err = RandomBytes(16) if err != nil { panic(err) } |