public class PedersenCommitment extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected PedersenCommitmentType |
type |
| 构造器和说明 |
|---|
PedersenCommitment(long ptr)
Instantiates a new Pedersen commitment.
|
| 限定符和类型 | 方法和说明 |
|---|---|
static byte[] |
computeBlindDelta(List<byte[]> inputs,
List<byte[]> outputs) |
static PedersenCommitment |
createCommitment(byte[] commitment)
Create commitment pedersen commitment.
|
static PedersenCommitment |
createCommitment(long value,
byte[] blind,
ValueHiding keypair,
byte[] extensions)
Create commitment pedersen commitment.
|
void |
destory()
Destory.
|
static byte[] |
genBlind()
Gen blind byte [ ].
|
byte[] |
getCommitment()
Get commitment byte [ ].
|
static byte[] |
getDecryptedBlind(byte[] commitment,
ValueHiding keypair) |
byte[] |
getDecryptedBlind(ValueHiding keypair) |
static long |
getDecryptedValue(byte[] commitment,
ValueHiding keypair) |
long |
getDecryptedValue(ValueHiding keypair) |
EncResult |
getEncValue()
Get enc value enc result.
|
long |
getPtr() |
static boolean |
isSumEqualsToZero(List<PedersenCommitment> pos,
List<PedersenCommitment> neg,
byte[] delta) |
static long |
nativeCreateCommitment(byte[] commitment)
Create commitment pedersen commitment.
|
protected long |
nativeNewInstance() |
byte[] |
toBytes() |
boolean |
verify(byte[] pub,
PedersenCommitment commitment) |
protected final PedersenCommitmentType type
public PedersenCommitment(long ptr)
ptr - the ptrpublic static byte[] genBlind()
public static PedersenCommitment createCommitment(long value, byte[] blind, ValueHiding keypair, byte[] extensions)
value - the valueblind - the blindkeypair - the keypairextensions - the extensionspublic static PedersenCommitment createCommitment(byte[] commitment)
commitment - the commitmentpublic static long nativeCreateCommitment(byte[] commitment)
commitment - the commitmentpublic static long getDecryptedValue(byte[] commitment,
ValueHiding keypair)
public static byte[] getDecryptedBlind(byte[] commitment,
ValueHiding keypair)
public static boolean isSumEqualsToZero(List<PedersenCommitment> pos, List<PedersenCommitment> neg, byte[] delta)
public void destory()
protected long nativeNewInstance()
public boolean verify(byte[] pub,
PedersenCommitment commitment)
public long getDecryptedValue(ValueHiding keypair)
public final byte[] getDecryptedBlind(ValueHiding keypair)
public EncResult getEncValue()
public final byte[] getCommitment()
public final byte[] toBytes()
public long getPtr()
Copyright © 2022. All rights reserved.