Files
stfs/internal/keys/read.go
2021-12-08 00:27:46 +01:00

16 lines
257 B
Go

package keys
import (
"io/ioutil"
"github.com/pojntfx/stfs/pkg/config"
)
func ReadKey(encryptionFormat string, pathToKey string) ([]byte, error) {
if encryptionFormat == config.NoneKey {
return []byte{}, nil
}
return ioutil.ReadFile(pathToKey)
}