Class Ed448PrivateKeyBuilder
java.lang.Object
zeroecho.core.alg.common.eddsa.AbstractEncodedPrivateKeyBuilder<Ed448PrivateKeySpec>
zeroecho.core.alg.ed448.Ed448PrivateKeyBuilder
- All Implemented Interfaces:
PrivateKeyImporter<Ed448PrivateKeySpec>
public final class Ed448PrivateKeyBuilder
extends AbstractEncodedPrivateKeyBuilder<Ed448PrivateKeySpec>
Ed448 Private Key Builder
Concrete builder for importing Ed448 private keys from their PKCS#8-encoded representation.
This class extends AbstractEncodedPrivateKeyBuilder and specifies the
Ed448 algorithm. It reconstructs PrivateKey instances
from Ed448PrivateKeySpec, which carries the raw encoded form.
Responsibilities
- Provide the canonical JCA key factory algorithm name
(
"Ed448"). - Extract the PKCS#8-encoded key bytes from
Ed448PrivateKeySpec. - Delegate actual key reconstruction to
KeyFactory.
Usage
// Import an Ed448 private key from encoded bytes
Ed448PrivateKeySpec spec = new Ed448PrivateKeySpec(encodedPkcs8Bytes);
PrivateKey key = new Ed448PrivateKeyBuilder().importPrivate(spec);
Thread-safety
Stateless and safe for concurrent use. Each call toPrivateKeyImporter.importPrivate(AlgorithmKeySpec)
creates a new KeyFactory.- Since:
- 1.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected byte[]Returns the PKCS#8-encoded private key bytes from the given specification.protected StringReturns the canonical JCA key factory algorithm name for Ed448.Methods inherited from class AbstractEncodedPrivateKeyBuilder
importPrivate
-
Constructor Details
-
Ed448PrivateKeyBuilder
public Ed448PrivateKeyBuilder()Creates a stateless Ed448 private-key importer.
-
-
Method Details
-
jcaKeyFactoryAlg
Returns the canonical JCA key factory algorithm name for Ed448.- Specified by:
jcaKeyFactoryAlgin classAbstractEncodedPrivateKeyBuilder<Ed448PrivateKeySpec>- Returns:
- the string
"Ed448"
-
encodedPkcs8
Returns the PKCS#8-encoded private key bytes from the given specification.- Specified by:
encodedPkcs8in classAbstractEncodedPrivateKeyBuilder<Ed448PrivateKeySpec>- Parameters:
spec- theEd448PrivateKeySpecholding encoded private key data- Returns:
- raw PKCS#8-encoded private key bytes
-