public SecretKey GenerateKey(Mechanism mech, P11Object template) { uint hKey = this.Module.P11Module.GenerateKey(hSession, mech.CK_MECHANISM, getAssignedAttributes(template)); return((SecretKey)SecretKey.GetInstance(this, hKey)); }