Class BCLMSPrivateKey
java.lang.Object
org.bouncycastle.pqc.jcajce.provider.lms.BCLMSPrivateKey
- All Implemented Interfaces:
Serializable
,Key
,PrivateKey
,Destroyable
,LMSKey
,LMSPrivateKey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionBCLMSPrivateKey
(PrivateKeyInfo keyInfo) BCLMSPrivateKey
(LMSKeyParameters keyParams) -
Method Summary
Modifier and TypeMethodDescriptionboolean
extractKeyShard
(int usageCount) Return a key representing a shard of the key space that can be used usageCount times.byte[]
long
getIndex()
Return the index of the next signature.int
Return the number of levels (L) associated with the key.long
Return the number of usages left for the private key.int
hashCode()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface javax.security.auth.Destroyable
destroy, isDestroyed
-
Constructor Details
-
BCLMSPrivateKey
-
BCLMSPrivateKey
- Throws:
IOException
-
-
Method Details
-
getIndex
public long getIndex()Description copied from interface:LMSPrivateKey
Return the index of the next signature.- Specified by:
getIndex
in interfaceLMSPrivateKey
- Returns:
- the index number for the next signature.
-
getUsagesRemaining
public long getUsagesRemaining()Description copied from interface:LMSPrivateKey
Return the number of usages left for the private key.- Specified by:
getUsagesRemaining
in interfaceLMSPrivateKey
- Returns:
- the number of times the key can be used before it is exhausted.
-
extractKeyShard
Description copied from interface:LMSPrivateKey
Return 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:
extractKeyShard
in interfaceLMSPrivateKey
- 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:
getAlgorithm
in interfaceKey
-
getFormat
-
getEncoded
public byte[] getEncoded()- Specified by:
getEncoded
in interfaceKey
-
equals
-
hashCode
public int hashCode() -
getLevels
public int getLevels()Description copied from interface:LMSKey
Return the number of levels (L) associated with the key.
-