{
harness.checkPoint("testKeyPairRawCodec");
kp = kpg.generate();
IKeyPairCodec codec = new DSSKeyPairRawCodec();
byte[] pk;
DSAPublicKey pubK = (DSAPublicKey) kp.getPublic();
pk = ((DSSPublicKey) pubK).getEncoded(IKeyPairCodec.RAW_FORMAT);
PublicKey newPubK = codec.decodePublicKey(pk);
harness.check(pubK.equals(newPubK),
"DSS public key Raw encoder/decoder test");
DSAPrivateKey secK = (DSAPrivateKey) kp.getPrivate();
pk = ((DSSPrivateKey) secK).getEncoded(IKeyPairCodec.RAW_FORMAT);
PrivateKey newSecK = codec.decodePrivateKey(pk);
harness.check(secK.equals(newSecK),
"DSS private key Raw encoder/decoder test");
}