public class RSAKeyPairX509Codec extends java.lang.Object implements IKeyPairCodec
Title: CC
Description:
Copyright: Copyright (c) 2002
Company: TUBITAK/UEKAE
Modifier and Type | Field and Description |
---|---|
static byte[] |
RSA_OIDarray |
static byte[] |
RSA_OIDarray2 |
RAW_FORMAT, X509_FORMAT
Constructor and Description |
---|
RSAKeyPairX509Codec() |
Modifier and Type | Method and Description |
---|---|
java.security.PrivateKey |
decodePrivateKey(byte[] input)
Decodes an instance of an external private key into its native Java
representation.
|
java.security.PublicKey |
decodePublicKey(byte[] input)
Decodes an instance of an external public key into its native Java
representation.
|
byte[] |
encodePrivateKey(java.security.PrivateKey key)
Encodes an instance of a private key for storage or transmission purposes.
|
byte[] |
encodePublicKey(java.security.PublicKey key)
Encodes an instance of a public key for storage or transmission purposes.
|
int |
getFormatID()
Returns the unique identifier (within this library) of the format used
to externalise public and private keys.
|
public static final byte[] RSA_OIDarray
public static final byte[] RSA_OIDarray2
public int getFormatID()
IKeyPairCodec
Returns the unique identifier (within this library) of the format used to externalise public and private keys.
getFormatID
in interface IKeyPairCodec
public byte[] encodePublicKey(java.security.PublicKey key)
IKeyPairCodec
Encodes an instance of a public key for storage or transmission purposes.
encodePublicKey
in interface IKeyPairCodec
key
- the non-null key to encode.public byte[] encodePrivateKey(java.security.PrivateKey key)
IKeyPairCodec
Encodes an instance of a private key for storage or transmission purposes.
encodePrivateKey
in interface IKeyPairCodec
key
- the non-null key to encode.public java.security.PublicKey decodePublicKey(byte[] input)
IKeyPairCodec
Decodes an instance of an external public key into its native Java representation.
decodePublicKey
in interface IKeyPairCodec
input
- the source of the externalised key to decode.public java.security.PrivateKey decodePrivateKey(byte[] input)
IKeyPairCodec
Decodes an instance of an external private key into its native Java representation.
decodePrivateKey
in interface IKeyPairCodec
input
- the source of the externalised key to decode.Copyright © 2025. All rights reserved.