Skip to content

Commit

Permalink
Make pepper configurable.
Browse files Browse the repository at this point in the history
  • Loading branch information
dkocher committed Mar 22, 2021
1 parent 6c2bdfd commit a2b99a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Expand Up @@ -1100,6 +1100,7 @@ Integrated Windows Authentication (IWA)
this.setDefault("cryptomator.vault.version", String.valueOf(7));
this.setDefault("cryptomator.vault.autodetect", String.valueOf(true));
this.setDefault("cryptomator.vault.masterkey.filename", "masterkey.cryptomator");
this.setDefault("cryptomator.vault.pepper", "");
}

/**
Expand Down
Expand Up @@ -77,6 +77,7 @@ public class CryptoVault implements Vault {

public static final int VAULT_VERSION_DEPRECATED = 6;
public static final int VAULT_VERSION = PreferencesFactory.get().getInteger("cryptomator.vault.version");
public static final byte[] VAULT_PEPPER = PreferencesFactory.get().getProperty("cryptomator.vault.pepper").getBytes(StandardCharsets.UTF_8);

public static final String DIR_PREFIX = "0";

Expand Down Expand Up @@ -106,7 +107,7 @@ public CryptoVault(final Path home) {
}

public CryptoVault(final Path home, final String masterkey) {
this(home, masterkey, new byte[0]);
this(home, masterkey, VAULT_PEPPER);
}

public CryptoVault(final Path home, final String masterkey, final byte[] pepper) {
Expand Down

0 comments on commit a2b99a9

Please sign in to comment.