Class BCXMSSMTPrivateKey
java.lang.Object
org.bouncycastle.pqc.jcajce.provider.xmss.BCXMSSMTPrivateKey
- All Implemented Interfaces:
Serializable,Key,PrivateKey,Destroyable,XMSSMTKey,XMSSMTPrivateKey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBCXMSSMTPrivateKey(ASN1ObjectIdentifier treeDigest, XMSSMTPrivateKeyParameters keyParams) BCXMSSMTPrivateKey(PrivateKeyInfo keyInfo) -
Method Summary
Modifier and TypeMethodDescriptionbooleanextractKeyShard(int usageCount) Return a key representing a shard of the key space that can be used usageCount times.byte[]intlonggetIndex()Return the index of the next signature.intlongReturn the number of usages left for the private key.inthashCode()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyed
-
Constructor Details
-
BCXMSSMTPrivateKey
-
BCXMSSMTPrivateKey
- Throws:
IOException
-
-
Method Details
-
getIndex
public long getIndex()Description copied from interface:XMSSMTPrivateKeyReturn the index of the next signature.- Specified by:
getIndexin interfaceXMSSMTPrivateKey- Returns:
- the index number for the next signature.
-
getUsagesRemaining
public long getUsagesRemaining()Description copied from interface:XMSSMTPrivateKeyReturn the number of usages left for the private key.- Specified by:
getUsagesRemainingin interfaceXMSSMTPrivateKey- Returns:
- the number of times the key can be used before it is exhausted.
-
extractKeyShard
Description copied from interface:XMSSMTPrivateKeyReturn a key representing a shard of the key space that can be used usageCount times.Note: this will use the range [index...index + usageCount) for the current key.
- Specified by:
extractKeyShardin interfaceXMSSMTPrivateKey- Parameters:
usageCount- the number of usages the key should have.- Returns:
- a key based on the current key that can be used usageCount times.
-
getAlgorithm
- Specified by:
getAlgorithmin interfaceKey
-
getFormat
-
getEncoded
public byte[] getEncoded()- Specified by:
getEncodedin interfaceKey
-
equals
-
hashCode
public int hashCode() -
getHeight
public int getHeight() -
getLayers
public int getLayers() -
getTreeDigest
- Specified by:
getTreeDigestin interfaceXMSSMTKey
-