public class BCLMSPrivateKey extends java.lang.Object implements java.security.PrivateKey, LMSPrivateKey
Constructor and Description |
---|
BCLMSPrivateKey(LMSKeyParameters keyParams) |
BCLMSPrivateKey(PrivateKeyInfo keyInfo) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
LMSPrivateKey |
extractKeyShard(int usageCount)
Return a key representing a shard of the key space that can be used usageCount times.
|
java.lang.String |
getAlgorithm() |
byte[] |
getEncoded() |
java.lang.String |
getFormat() |
long |
getIndex()
Return the index of the next signature.
|
int |
getLevels()
Return the number of levels (L) associated with the key.
|
long |
getUsagesRemaining()
Return the number of usages left for the private key.
|
int |
hashCode() |
public BCLMSPrivateKey(LMSKeyParameters keyParams)
public BCLMSPrivateKey(PrivateKeyInfo keyInfo) throws java.io.IOException
java.io.IOException
public long getIndex()
LMSPrivateKey
getIndex
in interface LMSPrivateKey
public long getUsagesRemaining()
LMSPrivateKey
getUsagesRemaining
in interface LMSPrivateKey
public LMSPrivateKey extractKeyShard(int usageCount)
LMSPrivateKey
Note: this will use the range [index...index + usageCount) for the current key.
extractKeyShard
in interface LMSPrivateKey
usageCount
- the number of usages the key should have.public java.lang.String getAlgorithm()
getAlgorithm
in interface java.security.Key
public java.lang.String getFormat()
getFormat
in interface java.security.Key
public byte[] getEncoded()
getEncoded
in interface java.security.Key
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object