Delete keys

Examples ›› Programs ››
Parent Previous Next

This example demonstrates how to delete a key pair from an OpenPGP KeyStore.


import com.didisoft.pgp.KeyStore;

public class DeleteKeyPair {

public static void main(String[] args) throws Exception{

       // initialize the KeyStore instance

       KeyStore ks = new KeyStore("pgp.keystore", "changeit");

       // delete the key pair

       ks.deleteKeyPair("test@gmail.com");

}

}