|
SunSPOT host API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.squawk.security.signing.ECKeyPair
public final class ECKeyPair
This class is a container for a key pair (a public key and a private key). It
does not enforce any security, and, when initialized, should be treated like
a PrivateKey
.
In addition, this class features a key generation method.
PublicKey
,
PrivateKey
Field Summary | |
---|---|
static byte |
ALG_EC_FP
KeyPair object containing an EC key pair for EC
operations over large prime fields. |
Constructor Summary | |
---|---|
ECKeyPair()
Constructs a KeyPair instance for the specified
algorithm and key length; the encapsulated keys are uninitialized. |
|
ECKeyPair(ECPublicKey publicKey,
ECPrivateKey privateKey)
Constructs a new KeyPair object containing the
specified public key and private key. |
Method Summary | |
---|---|
void |
genKeyPair()
(Re)Initializes the key objects encapsulated in this KeyPair instance with new key values. |
ECPrivateKey |
getPrivate()
Returns a reference to the private key component of this KeyPair object. |
ECPublicKey |
getPublic()
Returns a reference to the public key component of this KeyPair object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final byte ALG_EC_FP
KeyPair
object containing an EC key pair for EC
operations over large prime fields.
Constructor Detail |
---|
public ECKeyPair()
KeyPair
instance for the specified
algorithm and key length; the encapsulated keys are uninitialized. To
initialize the KeyPair
instance use the
genKeyPair()
method.
The encapsulated key objects implement the appropriate Key interface
associated with the specified algorithm (example -
ECPublicKey
interface for the public key and
ECPrivateKey
interface for the private key within an
ALG_EC_FP
key pair).
Signature
public ECKeyPair(ECPublicKey publicKey, ECPrivateKey privateKey)
KeyPair
object containing the
specified public key and private key.
Note that this constructor only stores references to the public and
private key components in the generated KeyPair
object. It does not throw an exception if the key parameter objects
are uninitialized.
publicKey
- the public keyprivateKey
- the private keyMethod Detail |
---|
public void genKeyPair()
KeyPair
instance with new key values. The initialized
public and private key objects encapsulated in this instance will
then be suitable for use with the Signature
,
Cipher
and KeyAgreement
objects. An
internal secure random number generator is used during new key pair
generation.
Signature
,
javacardx.crypto.Cipher
,
ECKey
public ECPublicKey getPublic()
KeyPair
object.
public ECPrivateKey getPrivate()
KeyPair
object.
|
SunSPOT host API V3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |