Skip to content

Commit

Permalink
Fix UnsupportedOperationException for fileNameCryptor() without revis…
Browse files Browse the repository at this point in the history
…ion.
  • Loading branch information
chenkins committed Feb 6, 2025
1 parent 80d67c4 commit f689235
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public UVFVault load(final Session<?> session, final PasswordCallback prompt) th
final CryptorProvider provider = CryptorProvider.forScheme(CryptorProvider.Scheme.UVF_DRAFT);
log.debug("Initialized crypto provider {}", provider);
this.cryptor = provider.provide(masterKey, FastSecureRandomProvider.get().provide());
this.fileNameCryptor = new CryptorCache(cryptor.fileNameCryptor());
this.fileNameCryptor = new CryptorCache(cryptor.fileNameCryptor(masterKey.firstRevision())); // TODO revision eventually depends on location - safe?
this.filenameProvider = new CryptoFilenameV7Provider(Integer.MAX_VALUE); // TODO there is no shortening in UVF defined yet
this.directoryProvider = new CryptoDirectoryV7Provider(vault, filenameProvider, fileNameCryptor);
this.nonceSize = 12;
Expand Down

0 comments on commit f689235

Please sign in to comment.