Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
381c8f1b9a |
@@ -21,7 +21,6 @@
|
||||
package swiss.qpq.gajumaru.core.crypto;
|
||||
|
||||
import java.util.Arrays;
|
||||
import swiss.qpq.gajumaru.core.tools.CryptoUtils;
|
||||
|
||||
|
||||
// Pure Java implementation of BLAKE2b.
|
||||
|
||||
@@ -29,7 +29,6 @@ import swiss.qpq.gajumaru.core.tools.CryptoUtils;
|
||||
|
||||
public final class Keccak256 {
|
||||
|
||||
private static final int LANE_SIZE = 64;
|
||||
private static final int STATE_SIZE = 25;
|
||||
private static final int CAPACITY = 512;
|
||||
private static final int BITRATE = 1600 - CAPACITY; // 1088 bits = 136 bytes
|
||||
|
||||
@@ -40,18 +40,7 @@ public final class Vault {
|
||||
/**
|
||||
* Holds the results of an encryption operation.
|
||||
*/
|
||||
public static final class Ciphertext {
|
||||
private final byte[] iv;
|
||||
private final byte[] data;
|
||||
|
||||
public Ciphertext(byte[] iv, byte[] data) {
|
||||
this.iv = iv;
|
||||
this.data = data;
|
||||
}
|
||||
|
||||
public byte[] getIv() { return iv; }
|
||||
public byte[] getData() { return data; }
|
||||
}
|
||||
public record Ciphertext(byte[] iv, byte[] data) {}
|
||||
|
||||
/**
|
||||
* Encrypts plaintext using AES/GCM.
|
||||
|
||||
Reference in New Issue
Block a user