Code example for KeyPair

0
        PrivateKeyStub privateKey = new PrivateKeyStub("privateAlgorithm", 
                "privateFormat", new byte[] { 0x00, 0x05, 0x10 }); 
        PublicKeyStub publicKey = new PublicKeyStub("publicAlgorithm", 
                "publicFormat", new byte[] { 0x01, 0x02, 0x12 }); 
 
        keyPair = new KeyPair(publicKey, privateKey); 
    } 
 
    /** 
     * Tests serialization compatibility 
     */ 
    public void testSerializationCompatibility() throws Exception { 
 
        SerializationTest.verifyGolden(this, keyPair, comparator); 
    } 
     
    /** 
     * Tests serialization/deserialization 
     */ 
    public void testSerializationSelf() throws Exception {