public class BCXMSSPrivateKey extends java.lang.Object implements java.security.PrivateKey, XMSSPrivateKey
Constructor and Description |
---|
BCXMSSPrivateKey(ASN1ObjectIdentifier treeDigest,
XMSSPrivateKeyParameters keyParams) |
BCXMSSPrivateKey(PrivateKeyInfo keyInfo) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
XMSSPrivateKey |
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() |
int |
getHeight() |
java.lang.String |
getTreeDigest() |
long |
getUsagesRemaining()
Return the number of usages left for the private key.
|
int |
hashCode() |
public BCXMSSPrivateKey(ASN1ObjectIdentifier treeDigest, XMSSPrivateKeyParameters keyParams)
public BCXMSSPrivateKey(PrivateKeyInfo keyInfo) throws java.io.IOException
java.io.IOException
public long getUsagesRemaining()
XMSSPrivateKey
getUsagesRemaining
in interface XMSSPrivateKey
public XMSSPrivateKey extractKeyShard(int usageCount)
XMSSPrivateKey
Note: this will use the range [index...index + usageCount) for the current key.
extractKeyShard
in interface XMSSPrivateKey
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
public java.lang.String getTreeDigest()
getTreeDigest
in interface XMSSKey