mirror of
https://salsa.debian.org/mdosch/go-sendxmpp
synced 2024-11-18 21:25:31 +00:00
Use fast.bin for fast cache file
So it's clear that this is no clear text file and it is not supposed to be edited by the user.
This commit is contained in:
parent
61f5ab705d
commit
79897fd295
@ -62,9 +62,9 @@ func getFastData(jid string, password string) (xmpp.Fast, error) {
|
||||
var fast xmpp.Fast
|
||||
fastPath, err := getDataPath(folder)
|
||||
if err != nil {
|
||||
return xmpp.Fast{}, fmt.Errorf("getFastData: failed to read fast cache file: %w", err)
|
||||
return xmpp.Fast{}, fmt.Errorf("getFastData: failed to read fast cache folder: %w", err)
|
||||
}
|
||||
fastFileLoc := fastPath + "fast"
|
||||
fastFileLoc := fastPath + "fast.bin"
|
||||
buf, err := readFile(fastFileLoc)
|
||||
if err != nil {
|
||||
return xmpp.Fast{}, fmt.Errorf("getFastData: failed to read fast cache file: %w", err)
|
||||
@ -106,7 +106,7 @@ func writeFastData(jid string, password string, fast xmpp.Fast) error {
|
||||
if err != nil {
|
||||
return fmt.Errorf("writeFastData: failed to write fast cache file: %w", err)
|
||||
}
|
||||
fastFileLoc := fastPath + "fast"
|
||||
fastFileLoc := fastPath + "fast.bin"
|
||||
salt := make([]byte, 32)
|
||||
key, err := scrypt.Key([]byte(password), salt, 32768, 8, 1, 32)
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user