Documentation ¶
Index ¶
- Constants
- func ChangeCipherPwd(cipherDir string)
- func ExportEmergencyFile(cipherDir, outpath string)
- func InfoCipherDir(cipherDir string)
- func InitCipherDir(cipherDir string)
- func LoadKey(cipherDir string, pwdfile string, password string) []byte
- func LoadKeySSS(pathsStr string) []byte
- func RecoverCipherDir(cipherDir, emerFile string)
- func SaveConf(path string, cf CipherConfig) error
- func SaveKey(cipherDir string, key []byte)
- func SaveKeySSS(cipherDir string, key []byte)
- type Args
- type CipherConfig
- type EmergencyConfig
Constants ¶
View Source
const ( // KeyCryptTypePWD key crypt using password KeyCryptTypePWD = 0 // KeyCryptTypeSSS key crypt using Shamir's Secret Sharing scheme KeyCryptTypeSSS = 1 )
Variables ¶
This section is empty.
Functions ¶
func ExportEmergencyFile ¶
func ExportEmergencyFile(cipherDir, outpath string)
ExportEmergencyFile read information and key of a cipher directory
save them to an outer file specified by user
func InfoCipherDir ¶
func InfoCipherDir(cipherDir string)
InfoCipherDir print information about a cipher directory
func InitCipherDir ¶
func InitCipherDir(cipherDir string)
InitCipherDir initialize a cipher directory
func RecoverCipherDir ¶
func RecoverCipherDir(cipherDir, emerFile string)
RecoverCipherDir recovers the cipher dir using emergency file
func SaveConf ¶
func SaveConf(path string, cf CipherConfig) error
SaveConf save cipher conf file to disk
func SaveKeySSS ¶
SaveKeySSS ask sss params and place to save then save keyshares
Types ¶
type Args ¶
type Args struct { CipherDir string MountPoint string PwdFile string Password string Emergency string KeyFiles string DebugFuse bool Debug bool Init bool Info bool ChangePwd bool Export bool Recover bool Foreground bool AllowOther bool ParentPid int }
Args contains cli args value
type CipherConfig ¶
type CipherConfig struct { Version int CryptType int CryptTypeStr string PlainBS int KeyCryptType int PlainPath bool }
CipherConfig is the content of a config file.
func LoadConf ¶
func LoadConf(cipherDir string) CipherConfig
LoadConf load config of the cipher directory
func LoadEmergencyFile ¶
func LoadEmergencyFile(path string) (CipherConfig, []byte)
LoadEmergencyFile load conf and key from a emergency file
func ReadConf ¶
func ReadConf(path string) (cf CipherConfig)
ReadConf read cipher conf from file and parse it
func (*CipherConfig) String ¶
func (cfg *CipherConfig) String() string
type EmergencyConfig ¶
type EmergencyConfig struct { CipherConfig EmergencyKey string }
EmergencyConfig is the content of a emergency file.
Click to show internal directories.
Click to hide internal directories.