public final class PemPrivateKey extends io.netty.util.AbstractReferenceCounted implements 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),
Serialized Form| Modifier and Type | Method and Description |
|---|---|
io.netty.buffer.ByteBuf |
content() |
PemPrivateKey |
copy() |
protected void |
deallocate() |
void |
destroy()
NOTE: This is a JDK8 interface/method.
|
PemPrivateKey |
duplicate() |
String |
getAlgorithm() |
byte[] |
getEncoded() |
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 |
replace(io.netty.buffer.ByteBuf content) |
PemPrivateKey |
retain() |
PemPrivateKey |
retain(int increment) |
PemPrivateKey |
retainedDuplicate() |
PemPrivateKey |
touch() |
PemPrivateKey |
touch(Object hint) |
static PemPrivateKey |
valueOf(byte[] key)
Creates a
PemPrivateKey from raw byte[]. |
static PemPrivateKey |
valueOf(io.netty.buffer.ByteBuf key)
Creates a
PemPrivateKey from raw ByteBuf. |
refCnt, release, release, setRefCntpublic 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(io.netty.buffer.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 io.netty.buffer.ByteBuf content()
public PemPrivateKey copy()
public PemPrivateKey duplicate()
public PemPrivateKey retainedDuplicate()
public PemPrivateKey replace(io.netty.buffer.ByteBuf content)
public PemPrivateKey touch()
touch in interface io.netty.util.ReferenceCountedtouch in class io.netty.util.AbstractReferenceCountedpublic PemPrivateKey touch(Object hint)
touch in interface io.netty.util.ReferenceCountedpublic PemPrivateKey retain()
retain in interface io.netty.util.ReferenceCountedretain in class io.netty.util.AbstractReferenceCountedpublic PemPrivateKey retain(int increment)
retain in interface io.netty.util.ReferenceCountedretain in class io.netty.util.AbstractReferenceCountedprotected void deallocate()
deallocate in class io.netty.util.AbstractReferenceCountedpublic byte[] getEncoded()
getEncoded in interface Keypublic String getAlgorithm()
getAlgorithm in interface Keypublic void destroy()
@Override annotation onto
this method.destroy in interface DestroyableDestroyable.destroy()public boolean isDestroyed()
@Override annotation onto
this method.isDestroyed in interface DestroyableDestroyable.isDestroyed()Copyright © 2008–2019 The Netty Project. All rights reserved.