Module org.cryptomator.cryptofs
Package org.cryptomator.cryptofs
Class VaultConfig.UnverifiedVaultConfig
java.lang.Object
org.cryptomator.cryptofs.VaultConfig.UnverifiedVaultConfig
- Enclosing class:
- VaultConfig
-
Method Details
-
getKeyId
- Returns:
- The ID of the key required to
loadthis config
-
getHeader
Gets a value from the tokens header- Type Parameters:
T- Type of the value- Parameters:
key- Which key to readclazz- Type of the value- Returns:
- The value or
nullif the key doesn't exist
-
allegedVaultVersion
public int allegedVaultVersion()- Returns:
- The unverified vault version (signature not verified)
-
allegedShorteningThreshold
public int allegedShorteningThreshold()- Returns:
- The unverified shortening threshold (signature not verified)
-
verify
public VaultConfig verify(byte[] rawKey, int expectedVaultVersion) throws VaultKeyInvalidException, VaultVersionMismatchException, VaultConfigLoadException Decodes a vault configuration stored in JWT format.- Parameters:
rawKey- The key matching the id ingetKeyId()expectedVaultVersion- The vault version this token should contain- Returns:
- The decoded configuration
- Throws:
VaultKeyInvalidException- If the provided key was invalidVaultVersionMismatchException- If the token did not match the expected vault versionVaultConfigLoadException- Generic parse error
-