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 UnsupportedOperationException
s.PemEncoded
,
OpenSslContext
,
valueOf(byte[])
,
valueOf(ByteBuf)
,
Serialized FormModifier 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, setRefCnt
public 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.ReferenceCounted
touch
in class io.netty.util.AbstractReferenceCounted
public PemPrivateKey touch(Object hint)
touch
in interface io.netty.util.ReferenceCounted
public PemPrivateKey retain()
retain
in interface io.netty.util.ReferenceCounted
retain
in class io.netty.util.AbstractReferenceCounted
public PemPrivateKey retain(int increment)
retain
in interface io.netty.util.ReferenceCounted
retain
in class io.netty.util.AbstractReferenceCounted
protected void deallocate()
deallocate
in class io.netty.util.AbstractReferenceCounted
public byte[] getEncoded()
getEncoded
in interface Key
public String getAlgorithm()
getAlgorithm
in interface Key
public void destroy()
@Override
annotation onto
this method.destroy
in interface Destroyable
Destroyable.destroy()
public boolean isDestroyed()
@Override
annotation onto
this method.isDestroyed
in interface Destroyable
Destroyable.isDestroyed()
Copyright © 2008–2019 The Netty Project. All rights reserved.