public void encodeTo(final ASN1Encoder encoder) { encoder.encodeInteger(skipCerts); } }
/** * Create an instance that will encode the given integer. * * @param value the integer to encode * @return the instance */ static ASN1Encodable ofInteger(int value) { return e -> e.encodeInteger(value); }
/** * Encode an ASN.1 <code>integer</code> value. * * @param integer the integer to encode */ void encodeInteger(BigInteger integer);
/** * Create an instance that will encode the given integer. * * @param value the integer to encode (must not be {@code null}) * @return the instance */ static ASN1Encodable ofInteger(BigInteger value) { Assert.checkNotNullParam("value", value); return e -> e.encodeInteger(value); }
protected void engineEncode(final ASN1Encoder encoder, final IteratedPasswordAlgorithmSpec parameterSpec) { encoder.encodeInteger(parameterSpec.getIterationCount()); }
protected void engineEncode(final ASN1Encoder encoder, final RSAParameterSpec parameterSpec) { encoder.encodeInteger(parameterSpec.getModulus()); }
public void encodeTo(final ASN1Encoder encoder) { encoder.startSequence(); if (requireExplicitPolicy >= 0) { encoder.encodeImplicit(0); encoder.encodeInteger(requireExplicitPolicy); } if (inhibitPolicyMapping >= 0) { encoder.encodeImplicit(1); encoder.encodeInteger(inhibitPolicyMapping); } encoder.endSequence(); } }
public void encodeTo(final ASN1Encoder encoder) { encoder.startSequence(); base.encodeTo(encoder); if (minimumDistance > 0) { encoder.encodeImplicit(0); encoder.encodeInteger(minimumDistance); } if (maximumDistance >= 0) { encoder.encodeImplicit(1); encoder.encodeInteger(maximumDistance); } } }
public void encodeTo(final ASN1Encoder encoder) { encoder.startSequence(); encoder.encodeBoolean(ca); if (ca && pathLenConstraint >= 0) encoder.encodeInteger(pathLenConstraint); encoder.endSequence(); } }
protected void engineEncode(final ASN1Encoder encoder, final IteratedSaltedPasswordAlgorithmSpec parameterSpec) { encoder.startSequence(); encoder.encodeInteger(parameterSpec.getIterationCount()); encoder.encodeOctetString(parameterSpec.getSalt()); encoder.endSequence(); }
protected void engineEncode(final ASN1Encoder encoder, final MaskedPasswordAlgorithmSpec parameterSpec) { encoder.startSequence(); encoder.encodeOctetString(new String(parameterSpec.getInitialKeyMaterial())); encoder.encodeInteger(parameterSpec.getIterationCount()); encoder.encodeOctetString(parameterSpec.getSalt()); encoder.endSequence(); }
protected void engineEncode(final ASN1Encoder encoder, final OneTimePasswordAlgorithmSpec parameterSpec) { encoder.startSequence(); encoder.encodeOctetString(parameterSpec.getAlgorithm()); encoder.encodeIA5String(parameterSpec.getSeed()); encoder.encodeInteger(parameterSpec.getSequenceNumber()); encoder.endSequence(); }
public void encodeTo(final ASN1Encoder encoder) { encoder.startSequence(); if (keyIdentifier != null) { encoder.encodeImplicit(0); encoder.encodeOctetString(keyIdentifier); } if (generalNames != null && ! generalNames.isEmpty()) { encoder.encodeImplicit(1); encoder.startSequence(); for (GeneralName generalName : generalNames) { generalName.encodeTo(encoder); } encoder.endSequence(); } if (serialNumber != null) { encoder.encodeImplicit(2); encoder.encodeInteger(serialNumber); } encoder.endSequence(); } }
/** * Construct a UserNotice policy qualifier. * * @param organizationText the organization text, or {@code null} to skip the NoticeReference section * @param noticeNumbers the notice numbers (only used if organization text is given) * @param explicitText explicit text for the notice, or {@code null} to skip the DisplayText section * @return the constructed policy qualifier */ public static PolicyQualifier userNoticeQualifier(String organizationText, BigInteger[] noticeNumbers, String explicitText) { return new PolicyQualifier(X500.OID_QT_UNOTICE, encoder -> { encoder.startSequence(); // userNotice if (organizationText != null) { encoder.startSequence(); // noticeRef encoder.encodeUTF8String(organizationText); encoder.startSequence(); // noticeNumbers if (noticeNumbers != null) for (BigInteger noticeNumber : noticeNumbers) { encoder.encodeInteger(noticeNumber); } encoder.endSequence(); // noticeNumbers encoder.endSequence(); // noticeRef } if (explicitText != null) { encoder.encodeUTF8String(explicitText); } encoder.endSequence(); // UserNotice }); }
/** * Create an instance that will encode the given integer. * * @param value the integer to encode * @return the instance */ static ASN1Encodable ofInteger(int value) { return e -> e.encodeInteger(value); }
/** * Encode an ASN.1 <code>integer</code> value. * * @param integer the integer to encode */ void encodeInteger(BigInteger integer);
/** * Create an instance that will encode the given integer. * * @param value the integer to encode (must not be {@code null}) * @return the instance */ static ASN1Encodable ofInteger(BigInteger value) { Assert.checkNotNullParam("value", value); return e -> e.encodeInteger(value); }
/** * Create an instance that will encode the given integer. * * @param value the integer to encode (must not be {@code null}) * @return the instance */ static ASN1Encodable ofInteger(BigInteger value) { Assert.checkNotNullParam("value", value); return e -> e.encodeInteger(value); }
public void encodeTo(final ASN1Encoder encoder) { encoder.startSequence(); encoder.encodeBoolean(ca); if (ca && pathLenConstraint >= 0) encoder.encodeInteger(pathLenConstraint); encoder.endSequence(); } }
protected void engineEncode(final ASN1Encoder encoder, final MaskedPasswordAlgorithmSpec parameterSpec) { encoder.startSequence(); encoder.encodeOctetString(new String(parameterSpec.getInitialKeyMaterial())); encoder.encodeInteger(parameterSpec.getIterationCount()); encoder.encodeOctetString(parameterSpec.getSalt()); encoder.endSequence(); }