Base64URL.encode(priv.getPrivateExponent()), Base64URL.encode(priv.getPrimeP()), Base64URL.encode(priv.getPrimeQ()),
/** * Sets the private RSA key, using the second representation, * with optional other primes info (see RFC 3447, section 3.2). * * @param priv The private RSA key, used to obtain the private * exponent ({@code d}), the first prime factor * ({@code p}), the second prime factor * ({@code q}), the first factor CRT exponent * ({@code dp}), the second factor CRT exponent * ({@code dq}), the first CRT coefficient * ({@code qi}) and the other primes info * ({@code oth}). Must not be {@code null}. * * @return This builder. */ public Builder privateKey(final RSAMultiPrimePrivateCrtKey priv) { d = Base64URL.encode(priv.getPrivateExponent()); p = Base64URL.encode(priv.getPrimeP()); q = Base64URL.encode(priv.getPrimeQ()); dp = Base64URL.encode(priv.getPrimeExponentP()); dq = Base64URL.encode(priv.getPrimeExponentQ()); qi = Base64URL.encode(priv.getCrtCoefficient()); oth = OtherPrimesInfo.toList(priv.getOtherPrimeInfo()); return this; }