mirror of
https://github.com/cryptomator/cryptomator.git
synced 2026-05-23 21:21:31 +00:00
reduced max file name size, locking metadata files before read/write.
This commit is contained in:
@@ -25,7 +25,7 @@ interface FileNamingConventions {
|
||||
* Maximum length possible on file systems with a filename limit of 255 chars.<br/>
|
||||
* Also we would need a few chars for our file extension, so lets use {@value #ENCRYPTED_FILENAME_LENGTH_LIMIT}.
|
||||
*/
|
||||
int ENCRYPTED_FILENAME_LENGTH_LIMIT = 250;
|
||||
int ENCRYPTED_FILENAME_LENGTH_LIMIT = 128;
|
||||
|
||||
/**
|
||||
* For plaintext file names <= {@value #ENCRYPTED_FILENAME_LENGTH_LIMIT} chars.
|
||||
|
||||
@@ -241,13 +241,13 @@ public class Aes256CryptorTest {
|
||||
private final Map<String, byte[]> map = new HashMap<>();
|
||||
|
||||
@Override
|
||||
public void writeMetadata(String encryptedPath, byte[] encryptedMetadata) {
|
||||
map.put(encryptedPath, encryptedMetadata);
|
||||
public void writeMetadata(String metadataGroup, byte[] encryptedMetadata) {
|
||||
map.put(metadataGroup, encryptedMetadata);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] readMetadata(String encryptedPath) {
|
||||
return map.get(encryptedPath);
|
||||
public byte[] readMetadata(String metadataGroup) {
|
||||
return map.get(metadataGroup);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user