public final class PemPrivateKey extends AbstractReferenceCounted implements java.security.PrivateKey
PrivateKey which allows the
user to pass PEM/PKCS#8 encoded key material straight into OpenSslContext
without having to parse and re-encode bytes in Java land.
All methods other than what's implemented in PemEncoded and Destroyable
throw UnsupportedOperationExceptions.PemEncoded,
OpenSslContext,
valueOf(byte[]),
valueOf(ByteBuf),
序列化表格| 限定符和类型 | 方法和说明 |
|---|---|
ByteBuf |
content()
Return the data which is held by this
ByteBufHolder. |
PemPrivateKey |
copy()
Create a deep copy of this
ByteBufHolder. |
protected void |
deallocate()
Called once
AbstractReferenceCounted.refCnt() is equals 0. |
void |
destroy()
NOTE: This is a JDK8 interface/method.
|
PemPrivateKey |
duplicate()
Duplicate the
ByteBufHolder. |
java.lang.String |
getAlgorithm() |
byte[] |
getEncoded() |
java.lang.String |
getFormat() |
boolean |
isDestroyed()
NOTE: This is a JDK8 interface/method.
|
boolean |
isSensitive()
Returns
true if the PEM encoded value is considered
sensitive information such as a private key. |
PemPrivateKey |
retain()
Increases the reference count by
1. |
PemPrivateKey |
retain(int increment)
Increases the reference count by the specified
increment. |
static PemPrivateKey |
valueOf(byte[] key)
Creates a
PemPrivateKey from raw byte[]. |
static PemPrivateKey |
valueOf(ByteBuf key)
Creates a
PemPrivateKey from raw ByteBuf. |
refCnt, release, release, setRefCntclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitrefCnt, release, releasepublic static PemPrivateKey valueOf(byte[] key)
PemPrivateKey from raw byte[].
ATTENTION: It's assumed that the given argument is a PEM/PKCS#8 encoded value.
No input validation is performed to validate it.public static PemPrivateKey valueOf(ByteBuf key)
PemPrivateKey from raw ByteBuf.
ATTENTION: It's assumed that the given argument is a PEM/PKCS#8 encoded value.
No input validation is performed to validate it.public boolean isSensitive()
true if the PEM encoded value is considered
sensitive information such as a private key.public ByteBuf content()
ByteBufHolderByteBufHolder.public PemPrivateKey copy()
ByteBufHolderByteBufHolder.public PemPrivateKey duplicate()
ByteBufHolderByteBufHolder. Be aware that this will not automatically call ByteBufHolder.retain().public PemPrivateKey retain()
ReferenceCounted1.retain 在接口中 ReferenceCountedretain 在类中 AbstractReferenceCountedpublic PemPrivateKey retain(int increment)
ReferenceCountedincrement.retain 在接口中 ReferenceCountedretain 在类中 AbstractReferenceCountedprotected void deallocate()
AbstractReferenceCountedAbstractReferenceCounted.refCnt() is equals 0.deallocate 在类中 AbstractReferenceCountedpublic byte[] getEncoded()
getEncoded 在接口中 java.security.Keypublic java.lang.String getAlgorithm()
getAlgorithm 在接口中 java.security.Keypublic java.lang.String getFormat()
getFormat 在接口中 java.security.Keypublic void destroy()
@Override annotation onto
this method.Destroyable.destroy()public boolean isDestroyed()
@Override annotation onto
this method.Destroyable.isDestroyed()