public OtherRecipientInfo( DerObjectIdentifier oriType, Asn1Encodable oriValue) { this.oriType = oriType; this.oriValue = oriValue; }
public ECKeyGenerationParameters( DerObjectIdentifier publicKeyParamSet, SecureRandom random) : this(ECKeyParameters.LookupParameters(publicKeyParamSet), random) { this.publicKeyParamSet = publicKeyParamSet; }
public DHKdfParameters( DerObjectIdentifier algorithm, int keySize, byte[] z) : this(algorithm, keySize, z, null) { }
public Attribute( DerObjectIdentifier attrType, Asn1Set attrValues) { this.attrType = attrType; this.attrValues = attrValues; }
public OtherKeyAttribute( DerObjectIdentifier keyAttrId, Asn1Encodable keyAttr) { this.keyAttrId = keyAttrId; this.keyAttr = keyAttr; }
public SemanticsInformation( Asn1Sequence seq) { if (seq.Count < 1) { throw new ArgumentException("no objects in SemanticsInformation"); } IEnumerator e = seq.GetEnumerator(); e.MoveNext(); object obj = e.Current; if (obj is DerObjectIdentifier) { semanticsIdentifier = DerObjectIdentifier.GetInstance(obj); if (e.MoveNext()) { obj = e.Current; } else { obj = null; } } if (obj != null) { Asn1Sequence generalNameSeq = Asn1Sequence.GetInstance(obj ); nameRegistrationAuthorities = new GeneralName[generalNameSeq.Count]; for (int i= 0; i < generalNameSeq.Count; i++) { nameRegistrationAuthorities[i] = GeneralName.GetInstance(generalNameSeq[i]); } } }
public SemanticsInformation( DerObjectIdentifier semanticsIdentifier, GeneralName[] generalNames) { this.semanticsIdentifier = semanticsIdentifier; this.nameRegistrationAuthorities = generalNames; }
public Gost3410KeyGenerationParameters( SecureRandom random, DerObjectIdentifier publicKeyParamSet) : this(random, LookupParameters(publicKeyParamSet)) { this.publicKeyParamSet = publicKeyParamSet; }
/** * returns an ArrayList with 0 or more objects of all the capabilities * matching the passed in capability Oid. If the Oid passed is null the * entire set is returned. */ public IList GetCapabilitiesForOid( DerObjectIdentifier capability) { IList list = Platform.CreateArrayList(); DoGetCapabilitiesForOid(capability, list); return list; }
public TimeStampRequest Generate( string digestAlgorithmOid, byte[] digest, BigInteger nonce) { if (digestAlgorithmOid == null) { throw new ArgumentException("No digest algorithm specified"); } DerObjectIdentifier digestAlgOid = new DerObjectIdentifier(digestAlgorithmOid); AlgorithmIdentifier algID = new AlgorithmIdentifier(digestAlgOid, DerNull.Instance); MessageImprint messageImprint = new MessageImprint(algID, digest); X509Extensions ext = null; if (extOrdering.Count != 0) { ext = new X509Extensions(extOrdering, extensions); } DerInteger derNonce = nonce == null ? null : new DerInteger(nonce); return new TimeStampRequest( new TimeStampReq(messageImprint, reqPolicy, derNonce, certReq, ext)); }
public ContentInfo( DerObjectIdentifier contentType, Asn1Encodable content) { this.contentType = contentType; this.content = content; }
public QCStatement( DerObjectIdentifier qcStatementId, Asn1Encodable qcStatementInfo) { this.qcStatementId = qcStatementId; this.qcStatementInfo = qcStatementInfo; }
protected Gost3410KeyParameters( bool isPrivate, DerObjectIdentifier publicKeyParamSet) : base(isPrivate) { this.parameters = LookupParameters(publicKeyParamSet); this.publicKeyParamSet = publicKeyParamSet; }
public DHPrivateKeyParameters( BigInteger x, DHParameters parameters, DerObjectIdentifier algorithmOid) : base(true, parameters, algorithmOid) { this.x = x; }
public SafeBag( DerObjectIdentifier oid, Asn1Object obj) { this.bagID = oid; this.bagValue = obj; this.bagAttributes = null; }
/** * add a given extension field for the standard extensions tag * The value parameter becomes the contents of the octet string associated * with the extension. */ public void AddExtension( string oid, bool critical, byte[] value) { DerObjectIdentifier derOid = new DerObjectIdentifier(oid); extensions[derOid] = new X509Extension(critical, new DerOctetString(value)); extOrdering.Add(derOid); }
private ResponseBytes( Asn1Sequence seq) { if (seq.Count != 2) throw new ArgumentException("Wrong number of elements in sequence", "seq"); this.responseType = DerObjectIdentifier.GetInstance(seq[0]); this.response = Asn1OctetString.GetInstance(seq[1]); }
public void Init( IDerivationParameters param) { DHKdfParameters parameters = (DHKdfParameters)param; this.algorithm = parameters.Algorithm; this.keySize = parameters.KeySize; this.z = parameters.GetZ(); // TODO Clone? }
private AttributePkcs( Asn1Sequence seq) { if (seq.Count != 2) throw new ArgumentException("Wrong number of elements in sequence", "seq"); attrType = DerObjectIdentifier.GetInstance(seq[0]); attrValues = Asn1Set.GetInstance(seq[1]); }
private Gost28147Parameters( Asn1Sequence seq) { if (seq.Count != 2) throw new ArgumentException("Wrong number of elements in sequence", "seq"); this.iv = Asn1OctetString.GetInstance(seq[0]); this.paramSet = DerObjectIdentifier.GetInstance(seq[1]); }
private AttributeX509( Asn1Sequence seq) { if (seq.Count != 2) throw new ArgumentException("Bad sequence size: " + seq.Count); attrType = DerObjectIdentifier.GetInstance(seq[0]); attrValues = Asn1Set.GetInstance(seq[1]); }
public SafeBag( DerObjectIdentifier oid, Asn1Object obj, Asn1Set bagAttributes) { this.bagID = oid; this.bagValue = obj; this.bagAttributes = bagAttributes; }
public EncryptedContentInfo( DerObjectIdentifier contentType, AlgorithmIdentifier contentEncryptionAlgorithm, Asn1OctetString encryptedContent) { this.contentType = contentType; this.contentEncryptionAlgorithm = contentEncryptionAlgorithm; this.encryptedContent = encryptedContent; }
public SafeBag( Asn1Sequence seq) { this.bagID = (DerObjectIdentifier) seq[0]; this.bagValue = ((DerTaggedObject) seq[1]).GetObject(); if (seq.Count == 3) { this.bagAttributes = (Asn1Set) seq[2]; } }
public SmimeCapability( Asn1Sequence seq) { capabilityID = (DerObjectIdentifier) seq[0].ToAsn1Object(); if (seq.Count > 1) { parameters = seq[1].ToAsn1Object(); } }
private ContentInfo( Asn1Sequence seq) { contentType = (DerObjectIdentifier) seq[0]; if (seq.Count > 1) { content = ((Asn1TaggedObject) seq[1]).GetObject(); } }
private QCStatement( Asn1Sequence seq) { qcStatementId = DerObjectIdentifier.GetInstance(seq[0]); if (seq.Count > 1) { qcStatementInfo = seq[1]; } }
public ECPublicKeyParameters( ECPoint q, DerObjectIdentifier publicKeyParamSet) : base("ECGOST3410", false, publicKeyParamSet) { if (q == null) throw new ArgumentNullException("q"); this.q = q; }
public Gost3410PrivateKeyParameters( BigInteger x, DerObjectIdentifier publicKeyParamSet) : base(true, publicKeyParamSet) { if (x.Sign < 1 || x.BitLength > 256 || x.CompareTo(Parameters.Q) >= 0) throw new ArgumentException("Invalid x for GOST3410 private key", "x"); this.x = x; }
public ECPrivateKeyParameters( BigInteger d, DerObjectIdentifier publicKeyParamSet) : base("ECGOST3410", true, publicKeyParamSet) { if (d == null) throw new ArgumentNullException("d"); this.d = d; }