Class LmsPublicKeySpec
java.lang.Object
zeroecho.core.alg.lms.LmsPublicKeySpec
- All Implemented Interfaces:
AlgorithmKeySpec
Encoded representation of an LMS public key in X.509 (SubjectPublicKeyInfo)
format.
LMS public keys are stateless and can be freely shared. The BCPQC provider
encodes them as standard X.509 DER, compatible with
KeyFactory.generatePublic(java.security.spec.KeySpec).
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionLmsPublicKeySpec(byte[] x509Der) Constructs a new spec from X.509 DER encoded LMS public key bytes. -
Method Summary
-
Constructor Details
-
LmsPublicKeySpec
public LmsPublicKeySpec(byte[] x509Der) Constructs a new spec from X.509 DER encoded LMS public key bytes.- Parameters:
x509Der- X.509 DER bytes- Throws:
NullPointerException- ifx509Deris null
-
-
Method Details
-
x509
public byte[] x509()Returns a defensive copy of the X.509 encoded key bytes.- Returns:
- X.509 DER bytes
-
marshal
Serializes this spec to aPairSeq.- Parameters:
spec- the spec to serialize- Returns:
- serialized representation
-
unmarshal
Deserializes a spec from aPairSeq.- Parameters:
p- serialized representation- Returns:
- reconstructed spec
- Throws:
IllegalArgumentException- if required field is missing
-
toString
-