public static boolean isDsaOid( ASN1ObjectIdentifier algOid) { for (int i = 0; i != dsaOids.length; i++) { if (algOid.equals(dsaOids[i])) { return true; } } return false; }
public CMSProcessableByteArray( byte[] bytes) { this(new ASN1ObjectIdentifier(CMSObjectIdentifiers.data.getId()), bytes); }
public static KeyPurposeId getInstance(Object o) { if (o instanceof KeyPurposeId) { return (KeyPurposeId)o; } else if (o != null) { return new KeyPurposeId(ASN1ObjectIdentifier.getInstance(o)); } return null; }
public String toString() { return ("AccessDescription: Oid(" + this.accessMethod.getId() + ")"); } }
private void initialize(ContentInfo contentInfo) { this.contentInfo = contentInfo; if (CMSObjectIdentifiers.timestampedData.equals(contentInfo.getContentType())) { this.timeStampedData = TimeStampedData.getInstance(contentInfo.getContent()); } else { throw new IllegalArgumentException("Malformed content - type must be " + CMSObjectIdentifiers.timestampedData.getId()); } util = new TimeStampDataUtil(this.timeStampedData); }
/** * Return an OID that creates a branch under the current one. * * @param branchID node numbers for the new branch. * @return the OID for the new created branch. */ public ASN1ObjectIdentifier branch(String branchID) { return new ASN1ObjectIdentifier(this, branchID); }
public String toString() { return id.toString(); } }
public String getAlgorithmName(ASN1ObjectIdentifier objectIdentifier) { String name = (String)algorithms.get(objectIdentifier); return (name != null) ? name : objectIdentifier.getId(); }
private void initialize(ContentInfo contentInfo) { this.contentInfo = contentInfo; if (CMSObjectIdentifiers.timestampedData.equals(contentInfo.getContentType())) { this.timeStampedData = TimeStampedData.getInstance(contentInfo.getContent()); } else { throw new IllegalArgumentException("Malformed content - type must be " + CMSObjectIdentifiers.timestampedData.getId()); } util = new TimeStampDataUtil(this.timeStampedData); }
public AttributeTypeAndValue( String oid, ASN1Encodable value) { this(new ASN1ObjectIdentifier(oid), value); }
/** * return the object identifier for the mac algorithm. */ public String getMacAlgOID() { return macAlg.getAlgorithm().toString(); }
public static boolean isDsaOid( ASN1ObjectIdentifier algOid) { for (int i = 0; i != dsaOids.length; i++) { if (algOid.equals(dsaOids[i])) { return true; } } return false; }
public CMSProcessableFile( File file, int bufSize) { this(new ASN1ObjectIdentifier(CMSObjectIdentifiers.data.getId()), file, bufSize); }
String getKeyAlgorithmName(ASN1ObjectIdentifier oid) { String name = (String)symmetricKeyAlgNames.get(oid); if (name != null) { return name; } return oid.getId(); } }
static String getSignatureName( AlgorithmIdentifier sigAlgId) { ASN1Encodable params = sigAlgId.getParameters(); if (params != null && !DERNull.INSTANCE.equals(params)) { if (sigAlgId.getAlgorithm().equals(PKCSObjectIdentifiers.id_RSASSA_PSS)) { RSASSAPSSparams rsaParams = RSASSAPSSparams.getInstance(params); return getDigestAlgName(rsaParams.getHashAlgorithm().getAlgorithm()) + "withRSAandMGF1"; } } return sigAlgId.getAlgorithm().getId(); }
public AttributeTypeAndValue( String oid, ASN1Encodable value) { this(new ASN1ObjectIdentifier(oid), value); }
public static CertPolicyId getInstance(Object o) { if (o instanceof CertPolicyId) { return (CertPolicyId)o; } else if (o != null) { return new CertPolicyId(ASN1ObjectIdentifier.getInstance(o)); } return null; }
/** * Recupera el tipo de contenido. * @return Tipo de contenido. */ public String getContentType() { return this.contentInfo.getContentType().toString(); }