cmd/syncthing: Add decrypt subcommand (#7332)

This adds the `syncthing decrypt` subcommand that is used to
(offline-)decrypt or just verify the contents of an encrypted folder.
This commit is contained in:
Jakob Borg
2021-02-12 08:38:43 +01:00
committed by GitHub
parent f2e9b40ad1
commit 55afa625fc
4 changed files with 275 additions and 2 deletions
+1
View File
@@ -29,6 +29,7 @@ var (
const (
DefaultMarkerName = ".stfolder"
EncryptionTokenName = "syncthing-encryption_password_token"
maxConcurrentWritesDefault = 2
maxConcurrentWritesLimit = 64
)
+1 -1
View File
@@ -3135,7 +3135,7 @@ func (s deviceIDSet) AsSlice() []protocol.DeviceID {
}
func encryptionTokenPath(cfg config.FolderConfiguration) string {
return filepath.Join(cfg.MarkerName, "syncthing-encryption_password_token")
return filepath.Join(cfg.MarkerName, config.EncryptionTokenName)
}
type storedEncryptionToken struct {