use Bouncycastle updated API