public class Signing extends Object
| Modifier and Type | Method and Description |
|---|---|
int[] |
address(int[] digests)
Address generates the address trits from the given digests.
|
int[] |
digest(int[] normalizedBundleFragment,
int[] signatureFragment) |
int[] |
digests(int[] key)
Digests hashes each segment of each key fragment 26 times and returns them.
|
int[] |
key(int[] inSeed,
int index)
Generates the key which is needed as a part of address generation.
|
int[] |
key(int[] inSeed,
int index,
int security)
Generates the key which is needed as a part of address generation.
|
int[] |
normalizedBundle(String bundleHash)
Normalizes the given bundle hash, with resulting digits summing to zero.
|
int[] |
signatureFragment(int[] normalizedBundleFragment,
int[] keyFragment) |
int[] |
subseed(int[] inSeed,
int index)
Returns the sub-seed trits given a seed and an index
|
Boolean |
validateSignatures(Bundle signedBundle,
String inputAddress) |
Boolean |
validateSignatures(String expectedAddress,
String[] signatureFragments,
String bundleHash) |
public Signing(ICurl curl)
public int[] subseed(int[] inSeed,
int index)
throws ArgumentException
inSeed - the seedindex - the indexArgumentExceptionpublic int[] key(int[] inSeed,
int index)
throws ArgumentException
digests(int[])
Calculates security based on inSeed length / key lengthinSeed - Tryte-encoded seed. It should be noted that this seed is not transferred.index - Key index for the addressArgumentException - is thrown when the specified security level is not validArgumentException - is thrown when inSeed length is not dividable by 3ArgumentException - is thrown when index is below 1public int[] key(int[] inSeed,
int index,
int security)
throws ArgumentException
digests(int[])inSeed - Tryte-encoded seed. It should be noted that this seed is not transferred.index - Key index for the addresssecurity - Security level to be used for the private key / address. Can be 1, 2 or 3.ArgumentException - is thrown when the specified security level is not validArgumentException - is thrown when inSeed length is not dividable by 3ArgumentException - is thrown when index is below 1public int[] address(int[] digests)
digests - the digestspublic int[] digests(int[] key)
throws ArgumentException
key - the key tritsArgumentException - if the security level is invalidpublic int[] digest(int[] normalizedBundleFragment,
int[] signatureFragment)
normalizedBundleFragment - signatureFragment - public int[] signatureFragment(int[] normalizedBundleFragment,
int[] keyFragment)
public Boolean validateSignatures(String expectedAddress, String[] signatureFragments, String bundleHash)
public int[] normalizedBundle(String bundleHash)
bundleHash - the bundle hashCopyright © 2019. All rights reserved.