How does off-hand spellcasting with two implements work?

With the Dual Implement Spellcaster feat, you can add the off-hand implement’s enhancement bonus to damage rolls.

1) What if you cast a spell with the off-hand implement? Do you get nothing from the main hand implement?

2) Is it even possible to cast a spell through the off-hand implement or do you have to designate one of your hands as your main hand and hold the implement you use in that one?

Can a Panoply Savant have multiple implements of one school

The Pathfinder Occultist class is a class introduced in Occult Adventures that draws its magic from trinkets into which the character invest their "mental focus". One such trinket is known as an "implement" :

Implements (Su): At 1st level, an occultist learns to use two implement schools. At 2nd level and every 4 occultist levels thereafter, the occultist learns to use one additional implement school, to a maximum of seven schools at 18th level. Each implement school adds one spell per spell level of that school of magic to the occultist’s spell list. […]

Each implement school is represented by a small list of objects. Every day, the occultist selects one item from that school’s list to be his implement for the day for each implement school he knows. The occultist needs only one such item to cast spells of the corresponding school, unless he selected that implement school multiple times, in which case he needs one item for each set of spells gained from that school.

This establishes the fact that one can, and in fact must, have one implement for each time they select an implement school.

A year later comes the Pathfinder Player Companion: Psychic Anthology which introduces the Panoply Savant occultist archetype, along with a new kind of "implement school" :

An occultist can select a panoply anytime he selects a new implement school. To do so, he must already have learned to use the implement school of each implement within the panoply at least once. As with any other implement school, when an occultist learns to use a panoply, he gains access to the resonant power and base focus power, and he becomes able to learn the panoply’s other focus powers. He also adds one spell of each spell level to his spell list, and these spells can be taken from any of the implement schools associated with the panoply.

So how many implements can/should a 2nd-level Panoply Savant with the Transmutation and Abjuration implement schools and the Trapping of the Warrior panoply ?

My guess would be three implements, with one being either from the Transmutation or the Abjuration list of possible implements, but it’s not backed up by raw, as choosing a panoply doesn’t exactly grants a "set of spells gained from that school." especially since I can choose a Transmutation spell for the 0-level spell, and an abjuration one for the 1st-level spell.

Who implements Cryptoki on PKCS#11 Infrastructure, Software or Token/Devices

I am new to PKCS#11, and I am going through the docs, and I am a little bit confused where Cryptoki fits in. And after I read the initial part of the OASIS Spec, I came to conclusion that the Implementation of the Interface is left to the application rather than the token – Smart Card, USB token or HSM. And, if that’s the case then how do you circumvent vender specific devices.

Thanks

Declaring an object that extends a class and implements more than one interface

I’m confused about how should I declare an object that implements more than one interface, or derives from a class that implements one interface, and implements another interface itself.

Let’s suppose I have a generic DAO interface, as follows:

public interface IDao<T> {    Optional<T> get(long id);    List<T> getAll();    void save(T t);    void update(T t, String[] params);    void delete(T t); } 

Then, I also have an implementation for this interface:

public class DaoImpl implements IDao<Entity> {   //implementation goes here } 

In my understanding, if I’d like to use this DAO implementation in another class, I should declare the object as an IDao, instead of DaoImpl, in order to be able to change the implementation without modifying the class. See below:

public class MyClass {    IDao dao;    public MyClass(IDao dao) {     this.dao = dao;   } } 

However, suppose I want to create an implementation that extends the DaoImpl and adds functionality, for example:

public class FilterDaoImpl extends DaoImpl implements IFilterDao<Entity> {   public List<Entity> getBetweenDates(Date start, Date end) {   //...   } } 

I believe I should also create an IFilterDao interface and make the FilterDaoImpl implement it. I’m not sure how to declare this implementation in a class. If I do it like this:

public class MyClass2 {    IFilterDao dao;    public MyClass(IFilterDao dao) {     this.dao = dao;   } } 

I won’t be able to call methods like getAll().

How should I declare the FilterDaoImplimplementation in a class?

How to go ahead with methods that only one derived class implements from a common interface?

I have one interface (let’s say in C++) that has been implemented by some derived classes. Let’s suppose that the interface is like this:

class IBase {   virtual bool method_1() = 0;   virtual long method_2(const std::string str) = 0;   // other methods   virtual long method_10(int value) = 0; }; 

and up to now 6 different derived classes (will be more in future) have implemented the interface. In lots of algorithms in my code, I have used this interface polymorphically. e.g:

// some usage obj = getObject(); if (obj->method_1()) {   return obj->method_2("Hello"); } else {   return obj->method_10(12); } 

Over the time, I have found that there would be lots of methods that only one derived class implements them. So, the Q is that is it the right design to put these methods in the interface or should I put them directly in the derived classes? But note that:

  • If I put them in the interface, only one derived class will implement them and for the rest of the derived classes the implementation will be empty.
  • If I put them in the derived classes, my implemented algorithms will not be generic anymore and I need to check the type of the derived class during my algorithm implementation.

What is the right way to go ahead in this case?

How can I determine which algorithm a certificate implements for data encryption?

I’m attempting to discover which encryption algorithm(s) are available on a particular Certificate.

Is this possible?

I have examined some certs in CertMgr and I see things like:

  • Signature Algorithm
  • Signature Hash Algorithm

certficate details

I also see the Key usage item which seems to indicate that the cert can be used for encryption (Data Encipherment).

data encipherment

I’m attempting to determine if there is a certificate that provides AES-128 when encrypting data that is sent to the user.

And, if so, where would I see that (how can I view that information)?

Which is the better way to call a method that is only available to one class that implements an interface but not the other one?

Basically I need to execute different actions given a certain condition. The existing code is written this way

Base interface

// DoSomething.java interface DoSomething {     void letDoIt(String info); } 

Implementation of the first worker class

class DoItThisWay implements DoSomething {   ... } 

Implementation of the second worker class

class DoItThatWay implements DoSomething {    ... } 

The main class

   class Main {      public doingIt(String info) {         DoSomething worker;         if (info == 'this') {           worker = new DoItThisWay();         } else {           worker = new DoItThatWay();         }         worker.letDoIt(info)      } 

This code works ok and is easy to understand.

Now, due to a new requirement, I need to pass a new piece of information that is only make sense to DoItThisWay.

My question is: does the following coding style good to handle this requirement.

Use new class variable and method

// Use new class variable and method  class DoItThisWay implements DoSomething {   private int quality;   DoSomething() {     quality = 0;   }    public void setQuality(int quality) {     this.quality = quality;   };   public void letDoIt(String info) {    if (quality > 50) { // make use of the new information      ...    } else {      ...    }  } ;  } 

If I do it this way, I need to make the corresponding change to the caller:

   class Main {      public doingIt(String info) {         DoSomething worker;         if (info == 'this') {           int quality = obtainQualityInfo();           DoItThisWay tmp = new DoItThisWay();           tmp.setQuality(quality)           worker = tmp;          } else {           worker = new DoItThatWay();         }         worker.letDoIt(info)      } 

Is it a good coding style? Or can I just cast it

   class Main {      public doingIt(String info) {         DoSomething worker;         if (info == 'this') {           int quality = obtainQualityInfo();           worker = new DoItThisWay();           ((DoItThisWay) worker).setQuality(quality)         } else {           worker = new DoItThatWay();         }         worker.letDoIt(info)      }