public class ECGKeyUtilTest
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private byte[] |
expEncodedPriKey |
private byte[] |
expEncodedPubKey |
private ECKey |
expKey |
private ECPrivateKeyParameters |
expPriKey |
private ECPublicKeyParameters |
expPubKey |
private ECKeyParam |
param |
Constructor and Description |
---|
ECGKeyUtilTest() |
Modifier and Type | Method and Description |
---|---|
void |
encodeDecodeBase64PubKey()
Test that encoding a public key as ASN.1 which is then further encoded as base64
for transmission and then decoding it back into an EC public key object results in
the same public key (the point Q has the same X and Y values)
TODO: Cannot test any Base64 methods as they rely on android, will have to either include the
specific android library or create a new android test project
|
void |
encodeDecodePriKey()
Test that encoding a private key as ASN.1 and then decoding it back into
an EC public key object results in the same private key (D)
|
void |
encodeDecodePubKey()
Test that encoding a public key as ASN.1 for transmission and then decoding
it back into an EC public key object results in the same public key (the point
Q has the same X and Y values)
|
void |
encodePriKeyAsPubKey()
Test that verifies that an exception is thrown if an encode function is
executed on the wrong key (ie.
|
void |
encodePubKeyAsPriKey()
Test that verifies that an exception is thrown if an encode function is
executed on the wrong key (ie.
|
void |
setUp() |
private ECKeyParam param
private ECKey expKey
private ECPublicKeyParameters expPubKey
private ECPrivateKeyParameters expPriKey
private byte[] expEncodedPubKey
private byte[] expEncodedPriKey
public void setUp() throws java.lang.Exception
java.lang.Exception
public void encodeDecodePubKey()
public void encodeDecodeBase64PubKey()
public void encodeDecodePriKey()
public void encodePriKeyAsPubKey()
public void encodePubKeyAsPriKey()