public String toString() { StringBuffer buf = new StringBuffer(); String nl = Strings.lineSeparator(); buf.append("EC Private Key").append(nl); buf.append(" S: ").append(this.d.toString(16)).append(nl); return buf.toString(); }
static String publicKeyToString(String algorithm, BigInteger y, GOST3410Parameters gostParams) { StringBuffer buf = new StringBuffer(); String nl = Strings.lineSeparator(); buf.append(algorithm); buf.append(" Public Key [").append(generateKeyFingerprint(y, gostParams)).append("]").append(nl); buf.append(" Y: ").append(y.toString(16)).append(nl); return buf.toString(); }
public String toString() { StringBuffer buf = new StringBuffer(); String sep = Strings.lineSeparator(); buf.append("GeneralNames:"); buf.append(sep); for (int i = 0; i != names.length; i++) { buf.append(" "); buf.append(names[i]); buf.append(sep); } return buf.toString(); } }
public String toString() { StringBuffer buf = new StringBuffer(); String nl = Strings.lineSeparator(); buf.append("DSA Public Key").append(nl); buf.append(" y: ").append(this.getY().toString(16)).append(nl); return buf.toString(); }
static String publicKeyToString(String algorithm, BigInteger y, DHParameters dhParams) { StringBuffer buf = new StringBuffer(); String nl = Strings.lineSeparator(); buf.append(algorithm); buf.append(" Public Key [").append(generateKeyFingerprint(y, dhParams)).append("]").append(nl); buf.append(" Y: ").append(y.toString(16)).append(nl); return buf.toString(); }
public String toString() { StringBuffer buf = new StringBuffer(); String nl = Strings.lineSeparator(); buf.append("RSA Public Key").append(nl); buf.append(" modulus: ").append(this.getModulus().toString(16)).append(nl); buf.append(" public exponent: ").append(this.getPublicExponent().toString(16)).append(nl); return buf.toString(); } }
public String toString() { StringBuffer buf = new StringBuffer(); String sep = Strings.lineSeparator(); buf.append("CRLDistPoint:"); buf.append(sep); DistributionPoint dp[] = getDistributionPoints(); for (int i = 0; i != dp.length; i++) { buf.append(" "); buf.append(dp[i]); buf.append(sep); } return buf.toString(); } }
public String toString() { StringBuffer buf = new StringBuffer(); String nl = Strings.lineSeparator(); buf.append("RSA Private Key [").append( RSAUtil.generateKeyFingerprint(this.getModulus())).append("],[]").append(nl); buf.append(" modulus: ").append(this.getModulus().toString(16)).append(nl); return buf.toString(); } }
public String toString() { StringBuffer buf = new StringBuffer(); String nl = Strings.lineSeparator(); buf.append("DSA Public Key [").append(DSAUtil.generateKeyFingerprint(y, getParams())).append("]").append(nl); buf.append(" Y: ").append(this.getY().toString(16)).append(nl); return buf.toString(); }
static String privateKeyToString(String algorithm, BigInteger x, DHParameters dhParams) { StringBuffer buf = new StringBuffer(); String nl = Strings.lineSeparator(); BigInteger y = dhParams.getG().modPow(x, dhParams.getP()); buf.append(algorithm); buf.append(" Private Key [").append(generateKeyFingerprint(y, dhParams)).append("]").append(nl); buf.append(" Y: ").append(y.toString(16)).append(nl); return buf.toString(); }
public String toString() { StringBuffer buf = new StringBuffer(); String nl = Strings.lineSeparator(); buf.append("EC Public Key").append(nl); buf.append(" X: ").append(this.q.getAffineXCoord().toBigInteger().toString(16)).append(nl); buf.append(" Y: ").append(this.q.getAffineYCoord().toBigInteger().toString(16)).append(nl); return buf.toString(); }
static String privateKeyToString(String algorithm, BigInteger x, GOST3410Parameters gostParams) { StringBuffer buf = new StringBuffer(); String nl = Strings.lineSeparator(); BigInteger y = gostParams.getA().modPow(x, gostParams.getP()); buf.append(algorithm); buf.append(" Private Key [").append(generateKeyFingerprint(y, gostParams)).append("]").append(nl); buf.append(" Y: ").append(y.toString(16)).append(nl); return buf.toString(); }
public static String publicKeyToString(String algorithm, org.bouncycastle.math.ec.ECPoint q, org.bouncycastle.jce.spec.ECParameterSpec spec) { StringBuffer buf = new StringBuffer(); String nl = Strings.lineSeparator(); buf.append(algorithm); buf.append(" Public Key [").append(ECUtil.generateKeyFingerprint(q, spec)).append("]").append(nl); buf.append(" X: ").append(q.getAffineXCoord().toBigInteger().toString(16)).append(nl); buf.append(" Y: ").append(q.getAffineYCoord().toBigInteger().toString(16)).append(nl); return buf.toString(); }
public String toString() { StringBuffer buf = new StringBuffer(); String nl = Strings.lineSeparator(); buf.append("RSA Public Key [").append(RSAUtil.generateKeyFingerprint(this.getModulus())).append("]") .append(",[") .append(RSAUtil.generateExponentFingerprint(this.getPublicExponent())) .append("]") .append(nl); buf.append(" modulus: ").append(this.getModulus().toString(16)).append(nl); buf.append("public exponent: ").append(this.getPublicExponent().toString(16)).append(nl); return buf.toString(); }
public static String privateKeyToString(String algorithm, BigInteger d, org.bouncycastle.jce.spec.ECParameterSpec spec) { StringBuffer buf = new StringBuffer(); String nl = Strings.lineSeparator(); org.bouncycastle.math.ec.ECPoint q = calculateQ(d, spec); buf.append(algorithm); buf.append(" Private Key [").append(ECUtil.generateKeyFingerprint(q, spec)).append("]").append(nl); buf.append(" X: ").append(q.getAffineXCoord().toBigInteger().toString(16)).append(nl); buf.append(" Y: ").append(q.getAffineYCoord().toBigInteger().toString(16)).append(nl); return buf.toString(); }
public String toString() { String sep = Strings.lineSeparator(); StringBuffer buf = new StringBuffer(); buf.append("DistributionPointName: ["); buf.append(sep); if (type == FULL_NAME) { appendObject(buf, sep, "fullName", name.toString()); } else { appendObject(buf, sep, "nameRelativeToCRLIssuer", name.toString()); } buf.append("]"); buf.append(sep); return buf.toString(); }
public String toString() { StringBuffer buf = new StringBuffer(); String nl = Strings.lineSeparator(); buf.append("RSA Private CRT Key [").append( RSAUtil.generateKeyFingerprint(this.getModulus())).append("]") .append(",[") .append(RSAUtil.generateExponentFingerprint(this.getPublicExponent())) .append("]") .append(nl); buf.append(" modulus: ").append(this.getModulus().toString(16)).append(nl); buf.append(" public exponent: ").append(this.getPublicExponent().toString(16)).append(nl); return buf.toString(); } }
public String toString() { StringBuffer buf = new StringBuffer(); String nl = Strings.lineSeparator(); buf.append("RSA Private CRT Key").append(nl); buf.append(" modulus: ").append(this.getModulus().toString(16)).append(nl); buf.append(" public exponent: ").append(this.getPublicExponent().toString(16)).append(nl); buf.append(" private exponent: ").append(this.getPrivateExponent().toString(16)).append(nl); buf.append(" primeP: ").append(this.getPrimeP().toString(16)).append(nl); buf.append(" primeQ: ").append(this.getPrimeQ().toString(16)).append(nl); buf.append(" primeExponentP: ").append(this.getPrimeExponentP().toString(16)).append(nl); buf.append(" primeExponentQ: ").append(this.getPrimeExponentQ().toString(16)).append(nl); buf.append(" crtCoefficient: ").append(this.getCrtCoefficient().toString(16)).append(nl); return buf.toString(); } }
public String toString() { StringBuffer buf = new StringBuffer(); String nl = Strings.lineSeparator(); BigInteger y = getParams().getG().modPow(x, getParams().getP()); buf.append("DSA Private Key [").append(DSAUtil.generateKeyFingerprint(y, getParams())).append("]").append(nl); buf.append(" Y: ").append(y.toString(16)).append(nl); return buf.toString(); } }
private int estimateOutFileSize(long inFileSize) { if (inFileSize > maxFileBufferSize) return maxFileBufferSize; else { long outFileSize = inFileSize; outFileSize += (1 + getRing().getEncryptionKeys().size() + getRing().getSigningKeys().size()) * 512; if (isAsciiArmored()) { outFileSize *= (4f / 3) * ((64f + Strings.lineSeparator().length()) / 64); outFileSize += 80; } return (outFileSize >= maxFileBufferSize) ? maxFileBufferSize : (int) outFileSize; } }