Codota Logo
CryptographicConstraint
Code IndexAdd Codota to your IDE (free)

How to use
CryptographicConstraint
in
eu.europa.esig.jaxb.policy

Best Java code snippets using eu.europa.esig.jaxb.policy.CryptographicConstraint (Showing top 4 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: esig/dss

/**
 * Create an instance of {@link CryptographicConstraint }
 * 
 */
public CryptographicConstraint createCryptographicConstraint() {
  return new CryptographicConstraint();
}
origin: esig/dss

ListAlgo acceptableEncryptionAlgo = constraint.getAcceptableEncryptionAlgo();
if ((acceptableEncryptionAlgo != null) && Utils.isCollectionNotEmpty(acceptableEncryptionAlgo.getAlgo())) {
  if (!isIn(token.getEncryptionAlgoUsedToSignThisToken(), acceptableEncryptionAlgo.getAlgo())) {
ListAlgo acceptableDigestAlgo = constraint.getAcceptableDigestAlgo();
if ((acceptableDigestAlgo != null) && Utils.isCollectionNotEmpty(acceptableDigestAlgo.getAlgo())) {
  if (!isIn(token.getDigestAlgoUsedToSignThisToken(), acceptableDigestAlgo.getAlgo())) {
ListAlgo miniPublicKeySize = constraint.getMiniPublicKeySize();
if ((miniPublicKeySize != null) && Utils.isCollectionNotEmpty(miniPublicKeySize.getAlgo())) {
  String keySize = token.getKeyLengthUsedToSignThisToken();
AlgoExpirationDate algoExpirationDate = constraint.getAlgoExpirationDate();
if ((algoExpirationDate != null) && Utils.isCollectionNotEmpty(algoExpirationDate.getAlgo())) {
origin: esig/dss

@Test
public void testUnmarshalling() throws Exception {
  ConstraintsParameters constraintsParameters = unmarshal(new File("src/test/resources/constraint.xml"));
  Algo algo = constraintsParameters.getSignatureConstraints().getBasicSignatureConstraints().getCryptographic().getMiniPublicKeySize().getAlgo().get(0);
  assertNotNull(algo);
  String algoName = algo.getValue();
  assertEquals("DSA", algoName);
  assertEquals("128", algo.getSize());
  JAXBContext jc = JAXBContext.newInstance("eu.europa.esig.jaxb.policy");
  Marshaller marshaller = jc.createMarshaller();
  marshaller.marshal(constraintsParameters, new FileOutputStream("target/constraint.xml"));
}
origin: esig/dss

private Date extractExpirationDate(final String algorithm, CryptographicConstraint signatureCryptographicConstraint) {
  AlgoExpirationDate algoExpirationDate = signatureCryptographicConstraint.getAlgoExpirationDate();
  String dateFormat = DateUtils.DEFAULT_DATE_FORMAT;
  if (algoExpirationDate != null) {
    if (Utils.isStringNotEmpty(algoExpirationDate.getFormat())) {
      dateFormat = algoExpirationDate.getFormat();
    }
    List<Algo> algos = algoExpirationDate.getAlgo();
    String foundExpirationDate = null;
    for (Algo algo : algos) {
      if (Utils.areStringsEqualIgnoreCase(algo.getValue(), algorithm)) {
        foundExpirationDate = algo.getDate();
      }
    }
    if (Utils.isStringNotEmpty(foundExpirationDate)) {
      return DateUtils.parseDate(dateFormat, foundExpirationDate);
    }
  }
  return null;
}
eu.europa.esig.jaxb.policyCryptographicConstraint

Javadoc

Group of constraints related to cryptographic usage

Java class for CryptographicConstraint complex type.

The following schema fragment specifies the expected content contained within this class.

 
<complexType name="CryptographicConstraint"> 
<complexContent> 
<extension base="{http://dss.esig.europa.eu/validation/policy}LevelConstraint"> 
<sequence> 
<element name="AcceptableEncryptionAlgo" type="{http://dss.esig.europa.eu/validation/policy}ListAlgo" minOccurs="0"/> 
<element name="MiniPublicKeySize" type="{http://dss.esig.europa.eu/validation/policy}ListAlgo" minOccurs="0"/> 
<element name="AcceptableDigestAlgo" type="{http://dss.esig.europa.eu/validation/policy}ListAlgo" minOccurs="0"/> 
<element name="AlgoExpirationDate" type="{http://dss.esig.europa.eu/validation/policy}AlgoExpirationDate" minOccurs="0"/> 
</sequence> 
</extension> 
</complexContent> 
</complexType> 

Most used methods

  • getMiniPublicKeySize
    Gets the value of the miniPublicKeySize property.
  • <init>
  • getAcceptableDigestAlgo
    Gets the value of the acceptableDigestAlgo property.
  • getAcceptableEncryptionAlgo
    Gets the value of the acceptableEncryptionAlgo property.
  • getAlgoExpirationDate
    Gets the value of the algoExpirationDate property.

Popular in Java

  • Making http post requests using okhttp
  • getSharedPreferences (Context)
  • runOnUiThread (Activity)
  • startActivity (Activity)
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • TimerTask (java.util)
    A task that can be scheduled for one-time or repeated execution by a Timer.
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now