Is there an faster algorithm to rotate 2 opposite corners? I can't find anything else but doing the sexy move multiple times.
This algorithm can be adapted to do what you need.
F D' F' B F D' F' U' F D F' D' F D F' U
Notation is standard
To deal with non adjacent corners where one corner is on the right hand side of F (corners in a diagonal), rotate U twice instead of once in the algorithm i.e.
F D' F' D F D' F' U2 F D F' D' F D F' U2
If both corners are far opposites (do not share any faces), make sure one corner is on the right hand side of F (as before), rotate L2 and then apply the original algorithm, and rotate L2 to finish.
Twist two diagonally opposite corners. One is twisted clockwise while the other anti-clockwise.
U L U' R2 U L' U' R2 D L2 D' R2 D L2 D' R2
This rotates front right clockwise and back left counterclockwise:
You can rotate the cube to avoid having to turn the back side but this orientation has the handy "hardy har, bub" mnemonic.