Files
stfs/internal/keyext/read.go

16 lines
259 B
Go

package keyext
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)
}