public void setPkcs11ConfFile(String confFile) { if (StringUtil.isBlank(confFile)) { this.pkcs11ConfFile = null; } else { this.pkcs11ConfFile = IoUtil.expandFilepath(confFile); } }
public CertificatePolicyInformation(String certPolicyId, List<CertificatePolicyQualifier> qualifiers) { this.certPolicyId = ParamUtil.requireNonBlank("certPolicyId", certPolicyId); this.qualifiers = CollectionUtil.unmodifiableList(qualifiers); }
@Override public void init(String conf) throws PasswordResolverException { Args.notBlank(conf, "conf"); ConfPairs pairs = new ConfPairs(conf); passwordFile = pairs.value("file"); if (StringUtil.isBlank(passwordFile)) { throw new PasswordResolverException("invalid configuration " + conf + ", no file is specified"); } passwordFile = IoUtil.expandFilepath(passwordFile); }
public static String toPemCert(X509Certificate cert) throws CertificateException { Args.notNull(cert, "cert"); return StringUtil.concat("-----BEGIN CERTIFICATE-----\n", Base64.encodeToString(cert.getEncoded(), true), "\n-----END CERTIFICATE-----"); }
public CertprofileInfo(String name, String type, String conf) { this.name = Args.toNonBlankLower(name, "name"); this.type = StringUtil.isBlank(type) ? null : type; this.conf = StringUtil.isBlank(conf) ? null : conf; }
/** * TODO. * @param id * Identifier. Must not be {@code null}. * @param label * Label. Must not be {@code null}. */ public P11ObjectIdentifier(byte[] id, String label) { this.id = ParamUtil.requireNonNull("id", id); this.label = ParamUtil.requireNonNull("label", label); this.idHex = Hex.encode(id); }
public BenchmarkExecutor(String description) { this.description = Args.notNull(description, "description"); this.processLog = new ProcessLog(0); }
/** * Returns the hex representation of the bytes. * * @param bytes * Data to be encoded. Must not be {@code null}. * @return the hex representation of the bytes. */ protected static String hex(byte[] bytes) { return Hex.encode(bytes); }
/** * Sets the size of the cache. * * @param maxSize the new maximum size. */ public void resize(int maxSize) { synchronized (this) { this.maxSize = Args.positive(maxSize, "maxSize"); } trimToSize(maxSize); }
public void setPkcs11ConfFile(String confFile) { if (StringUtil.isBlank(confFile)) { this.pkcs11ConfFile = null; } else { this.pkcs11ConfFile = IoUtil.expandFilepath(confFile); } }
public BenchmarkExecutor(String description) { this.description = Args.notNull(description, "description"); this.processLog = new ProcessLog(0); }
/** * Sets the size of the cache. * * @param maxSize the new maximum size. */ public void resize(int maxSize) { synchronized (this) { this.maxSize = Args.positive(maxSize, "maxSize"); } trimToSize(maxSize); }