Update USAGE.txt
Also run go fmt
This commit is contained in:
parent
de56fe9e35
commit
1ec0fa388d
@ -16,6 +16,8 @@ Options:
|
|||||||
Use OpenSSL instead of built-in Go crypto (default true)
|
Use OpenSSL instead of built-in Go crypto (default true)
|
||||||
-passwd
|
-passwd
|
||||||
Change password
|
Change password
|
||||||
|
-plaintextnames
|
||||||
|
Do not encrypt file names - can only be used together with -init
|
||||||
-version
|
-version
|
||||||
Print version and exit
|
Print version and exit
|
||||||
-zerokey
|
-zerokey
|
||||||
|
@ -22,7 +22,7 @@ type CryptFS struct {
|
|||||||
plainBS uint64
|
plainBS uint64
|
||||||
cipherBS uint64
|
cipherBS uint64
|
||||||
// Stores an all-zero block of size cipherBS
|
// Stores an all-zero block of size cipherBS
|
||||||
allZeroBlock []byte
|
allZeroBlock []byte
|
||||||
plaintextNames bool
|
plaintextNames bool
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -50,11 +50,11 @@ func NewCryptFS(key []byte, useOpenssl bool, plaintextNames bool) *CryptFS {
|
|||||||
cipherBS := DEFAULT_PLAINBS + NONCE_LEN + AUTH_TAG_LEN
|
cipherBS := DEFAULT_PLAINBS + NONCE_LEN + AUTH_TAG_LEN
|
||||||
|
|
||||||
return &CryptFS{
|
return &CryptFS{
|
||||||
blockCipher: b,
|
blockCipher: b,
|
||||||
gcm: gcm,
|
gcm: gcm,
|
||||||
plainBS: DEFAULT_PLAINBS,
|
plainBS: DEFAULT_PLAINBS,
|
||||||
cipherBS: uint64(cipherBS),
|
cipherBS: uint64(cipherBS),
|
||||||
allZeroBlock: make([]byte, cipherBS),
|
allZeroBlock: make([]byte, cipherBS),
|
||||||
plaintextNames: plaintextNames,
|
plaintextNames: plaintextNames,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
7
main.go
7
main.go
@ -58,8 +58,8 @@ func initDir(dirArg string, plaintextNames bool) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func usageText() {
|
func usageText() {
|
||||||
fmt.Printf("Usage: %s [OPTIONS] CIPHERDIR MOUNTPOINT\n", PROGRAM_NAME)
|
fmt.Fprintf(os.Stderr, "Usage: %s [OPTIONS] CIPHERDIR MOUNTPOINT\n", PROGRAM_NAME)
|
||||||
fmt.Printf("\nOptions:\n")
|
fmt.Fprintf(os.Stderr, "\nOptions:\n")
|
||||||
flag.PrintDefaults()
|
flag.PrintDefaults()
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +83,8 @@ func main() {
|
|||||||
flag.BoolVar(&args.passwd, "passwd", false, "Change password")
|
flag.BoolVar(&args.passwd, "passwd", false, "Change password")
|
||||||
flag.BoolVar(&args.foreground, "f", false, "Stay in the foreground")
|
flag.BoolVar(&args.foreground, "f", false, "Stay in the foreground")
|
||||||
flag.BoolVar(&args.version, "version", false, "Print version and exit")
|
flag.BoolVar(&args.version, "version", false, "Print version and exit")
|
||||||
flag.BoolVar(&args.plaintextnames, "plaintextnames", false, "Do not encrypt file names")
|
flag.BoolVar(&args.plaintextnames, "plaintextnames", false,
|
||||||
|
"Do not encrypt file names - can only be used together with -init")
|
||||||
flag.StringVar(&args.masterkey, "masterkey", "", "Mount with explicit master key")
|
flag.StringVar(&args.masterkey, "masterkey", "", "Mount with explicit master key")
|
||||||
args.cpuprofile = flag.String("cpuprofile", "", "Write cpu profile to specified file")
|
args.cpuprofile = flag.String("cpuprofile", "", "Write cpu profile to specified file")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user