org.bouncycastle.pqc.jcajce.spec.SPHINCS256KeyGenParameterSpec Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bcprov-ext-debug-jdk18on Show documentation
Show all versions of bcprov-ext-debug-jdk18on Show documentation
The Bouncy Castle Crypto package is a Java implementation of cryptographic algorithms. This jar contains JCE provider and lightweight API for the Bouncy Castle Cryptography APIs for Java 1.8 and later with debug enabled.
The newest version!
package org.bouncycastle.pqc.jcajce.spec;
import java.security.spec.AlgorithmParameterSpec;
/**
* Key generation spec for SPHINCS-256 to allow specifying of tree hash.
*/
public class SPHINCS256KeyGenParameterSpec
implements AlgorithmParameterSpec
{
/**
* Use SHA512-256 for the tree generation function.
*/
public static final String SHA512_256 = "SHA512-256";
/**
* Use SHA3-256 for the tree generation function.
*/
public static final String SHA3_256 = "SHA3-256";
private final String treeHash;
/**
* Default constructor SHA512-256
*/
public SPHINCS256KeyGenParameterSpec()
{
this(SHA512_256);
}
/**
* Specify the treehash, one of SHA512-256, or SHA3-256.
*
* @param treeHash the hash for building the public key tree.
*/
public SPHINCS256KeyGenParameterSpec(String treeHash)
{
this.treeHash = treeHash;
}
public String getTreeDigest()
{
return treeHash;
}
}