c304626a47
The old ones were rendered by github almost as big as the parent headings.
1.5 KiB
1.5 KiB
Stable CLI ABI
If you want to call gocryptfs from your script or app, this is the stable ABI.
General
- A password is piped into gocryptfs with an optional terminating newline. Any unexpected data after the final newline will cause gocryptfs to abort.
- Always pass "--" after the options. This prevents a CIPERDIR that starts with a dash ("-") to wreak havoc.
- Use "-q" to get rid of all informational messages. Only error messages (if any) will be printed to stderr (capture it!).
- Check the exit code of gocryptfs. 0 is success, anything else is an error and details about that error will have been printed to stderr.
Initialize Filesystem
Bash example
$ cat mypassword.txt | gocryptfs -init -q -- CIPHERDIR
Content of "mypassword.txt":
mypassword1234
What you have to pipe to gocryptfs
- Password
- Optional newline
Notes
- The CIPHERDIR directory must exist and be empty
Mount
Bash example
$ cat mypassword.txt | gocryptfs -q -- CIPHERDIR MOUNTPOINT
What you have to pipe to gocryptfs
Same as for "Initialize Filesystem".
Notes
- The MOUNTPOINT directory must exist and be empty.
Change Password
Bash example
$ cat change.txt | gocryptfs -passwd -q -- CIPHERDIR
Content of "change.txt":
mypassword1234
newpassword9876
What you have to pipe to gocryptfs
- Old password
- Newline
- New password
- Optional newline