final InputStream config = new ByteArrayInputStream(
new StringBuilder().append("name=").append(name).append("\n")
.append("library=").append(library)
.toString().getBytes());
Provider provider = new SunPKCS11(config);
Security.addProvider(provider);
final KeyStore.Builder builder = KeyStore.Builder.newInstance("PKCS11",
provider, callbackHandlerProtection);