refactor: Split keys and keyext packages, make compression, signature and encryption packages public
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
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)
|
||||
}
|
||||
Reference in New Issue
Block a user