refactor: Split keys and keyext packages, make compression, signature and encryption packages public

This commit is contained in:
Felicitas Pojtinger
2022-01-03 14:56:46 +01:00
parent b0a1b61297
commit 5d5b6ebb96
27 changed files with 65 additions and 55 deletions
+15
View File
@@ -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)
}