Search in sources :

Example 1 with ECKeyStore

use of it.unica.tcs.lib.ECKeyStore in project balzac by balzac-lang.

the class ASTUtils method getECKeyStore.

public ECKeyStore getECKeyStore(EObject obj) throws KeyStoreException {
    ECKeyStore kstore = new ECKeyStore();
    EObject root = EcoreUtil2.getRootContainer(obj);
    List<KeyLiteral> keys = EcoreUtil2.getAllContentsOfType(root, KeyLiteral.class);
    for (KeyLiteral k : keys) {
        if (isPrivateKey(k)) {
            kstore.addKey(k.getValue());
        }
    }
    return kstore;
}
Also used : ECKeyStore(it.unica.tcs.lib.ECKeyStore) EObject(org.eclipse.emf.ecore.EObject) KeyLiteral(it.unica.tcs.bitcoinTM.KeyLiteral)

Aggregations

KeyLiteral (it.unica.tcs.bitcoinTM.KeyLiteral)1 ECKeyStore (it.unica.tcs.lib.ECKeyStore)1 EObject (org.eclipse.emf.ecore.EObject)1