Class SphincsPlusPrivateKeyBuilder

java.lang.Object
zeroecho.core.alg.sphincsplus.SphincsPlusPrivateKeyBuilder
All Implemented Interfaces:
PrivateKeyImporter<SphincsPlusPrivateKeySpec>

public final class SphincsPlusPrivateKeyBuilder extends Object implements PrivateKeyImporter<SphincsPlusPrivateKeySpec>
Builder for importing SPHINCS+ private keys from encoded specifications.

SphincsPlusPrivateKeyBuilder integrates with the JCA KeyFactory to parse PKCS#8-encoded SPHINCS+ private keys. Unlike SphincsPlusKeyGenBuilder, this builder does not generate new key pairs but focuses solely on importing private key material.

The exact supported operation is importPrivate(SphincsPlusPrivateKeySpec). Other key operations are registered through their own exact interfaces.

Example

// Assuming bytes contain a PKCS#8-encoded SPHINCS+ private key:
SphincsPlusPrivateKeySpec spec =
    new SphincsPlusPrivateKeySpec(encodedBytes, "BC");

PrivateKey priv =
    new SphincsPlusPrivateKeyBuilder().importPrivate(spec);
Since:
1.0