Search in sources :

Example 6 with IContactDescriptor

use of org.jcryptool.crypto.keystore.descriptors.interfaces.IContactDescriptor in project core by jcryptool.

the class ContactManager method addSecretKey.

public void addSecretKey(IKeyStoreAlias alias) {
    // $NON-NLS-1$
    LogUtil.logInfo("Adding secret key " + alias.getAliasString());
    if (contactExists(alias.getContactName())) {
        contactsDesc.get(alias.getContactName()).addSecretKey(alias);
    } else {
        IContactDescriptor contact = newContact(new Contact(alias.getContactName(), null, null, null, null));
        contact.addSecretKey(alias);
    }
    notifyListeners();
}
Also used : IContactDescriptor(org.jcryptool.crypto.keystore.descriptors.interfaces.IContactDescriptor)

Aggregations

IContactDescriptor (org.jcryptool.crypto.keystore.descriptors.interfaces.IContactDescriptor)6 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 List (java.util.List)1 JAXBException (javax.xml.bind.JAXBException)1 KeyStoreAlias (org.jcryptool.crypto.keystore.backend.KeyStoreAlias)1 IKeyStoreAlias (org.jcryptool.crypto.keystore.keys.IKeyStoreAlias)1