This commit introduces a new `rootfs` package that provides an encrypted passthrough storage system. The `LocalStorage` implementation uses the local file system as its backing store and encrypts all data at rest using the `chachapoly` package. The functionality is exposed through the main `crypt` package, providing a clean and simple API for creating and interacting with encrypted file-based storage.
11 lines
308 B
Go
11 lines
308 B
Go
package crypt
|
|
|
|
import "github.com/Snider/Enchantrix/rootfs"
|
|
|
|
// Storage is an alias for the rootfs.Storage interface.
|
|
type Storage = rootfs.Storage
|
|
|
|
// NewRootFS creates a new encrypted passthrough storage system.
|
|
func NewRootFS(root string, key []byte) Storage {
|
|
return rootfs.NewLocalStorage(root, key)
|
|
}
|