Files
OpenJNIC/src/main/java/dev/jnic/crypto/NoncePair.java
T
2026-11-15 13:15:53 -05:00

35 lines
705 B
Java

package dev.jnic.crypto;
import java.util.concurrent.ThreadLocalRandom;
public class NoncePair {
private final long high;
private final long low;
private final byte[] seed;
public NoncePair(long high, long low, byte[] seed) {
this.high = high;
this.low = low;
this.seed = seed;
}
public NoncePair(long high, long low) {
this.high = high;
this.low = low;
this.seed = new byte[32];
ThreadLocalRandom.current().nextBytes(this.seed);
}
public long getLow() {
return this.low;
}
public long getHigh() {
return this.high;
}
public byte[] getSeed() {
return this.seed;
}
}