use of com.hedera.services.bdd.spec.keys.KeyGenerator in project hedera-services by hashgraph.
the class HapiFileCreate method generateWaclKey.
private void generateWaclKey(HapiApiSpec spec) {
KeyGenerator generator = effectiveKeyGen();
if (keyName.isPresent()) {
waclKey = spec.registry().getKey(keyName.get());
return;
}
if (waclControl.isPresent()) {
SigControl control = waclControl.get();
Assertions.assertEquals(SigControl.Nature.LIST, control.getNature(), "WACL must be a KeyList!");
waclKey = spec.keys().generateSubjectTo(spec, control, generator);
} else {
waclKey = spec.keys().generate(spec, KeyFactory.KeyType.LIST, generator);
}
}
Aggregations