Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests for encrypted indexes are added.
Few bugs in hash index encryption were fixed.
- Loading branch information
Showing
20 changed files
with
470 additions
and
350 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
.../com/orientechnologies/orient/core/storage/index/hashindex/local/MessageDigestHolder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.orientechnologies.orient.core.storage.index.hashindex.local; | ||
|
||
import java.security.MessageDigest; | ||
import java.security.NoSuchAlgorithmException; | ||
|
||
public class MessageDigestHolder { | ||
private static final MessageDigestHolder INSTANCE = new MessageDigestHolder(); | ||
|
||
private final ThreadLocal<MessageDigest> messageDigest = ThreadLocal.withInitial(() -> { | ||
try { | ||
return MessageDigest.getInstance("SHA-256"); | ||
} catch (NoSuchAlgorithmException e) { | ||
throw new IllegalStateException("SHA-256 algorithm is not implemented", e); | ||
} | ||
}); | ||
|
||
public static MessageDigestHolder instance() { | ||
return INSTANCE; | ||
} | ||
|
||
public MessageDigest get() { | ||
return messageDigest.get(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.