public DerObjectIdentifier(DerObjectIdentifier oid, string branchID) { if(!IsValidBranchID(branchID, 0)) throw new ArgumentException("string " + branchID + " not a valid OID branch", "branchID"); this.identifier = oid.Id + "." + branchID; }
/** * 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 ContentInfo( DerObjectIdentifier contentType, Asn1Encodable content) { this.contentType = contentType; this.content = content; }
public ArrayList GetCapabilities( DerObjectIdentifier capability) { ArrayList list = new ArrayList(); DoGetCapabilitiesForOid(capability, list); return list; }
public OtherKeyAttribute( DerObjectIdentifier keyAttrId, Asn1Encodable keyAttr) { this.keyAttrId = keyAttrId; this.keyAttr = keyAttr; }
public Gost3410KeyGenerationParameters( SecureRandom random, DerObjectIdentifier publicKeyParamSet) : this(random, LookupParameters(publicKeyParamSet)) { this.publicKeyParamSet = publicKeyParamSet; }
public AttributeX509( DerObjectIdentifier attrType, Asn1Set attrValues) { this.attrType = attrType; this.attrValues = attrValues; }
private static void DefineCurve( string name, DerObjectIdentifier oid) { objIds.Add(name, oid); names.Add(oid, name); }
public DHKdfParameters( DerObjectIdentifier algorithm, int keySize, byte[] z) : this(algorithm, keySize, z, null) { }
public ECKeyGenerationParameters( DerObjectIdentifier publicKeyParamSet, SecureRandom random) : this(ECKeyParameters.LookupParameters(publicKeyParamSet), random) { this.publicKeyParamSet = publicKeyParamSet; }
public SafeBag( DerObjectIdentifier oid, Asn1Object obj) { this.bagID = oid; this.bagValue = obj; this.bagAttributes = null; }
public DHPrivateKeyParameters( BigInteger x, DHParameters parameters, DerObjectIdentifier algorithmOid) : base(true, parameters, algorithmOid) { this.x = x; }
protected Gost3410KeyParameters( bool isPrivate, DerObjectIdentifier publicKeyParamSet) : base(isPrivate) { this.parameters = LookupParameters(publicKeyParamSet); this.publicKeyParamSet = publicKeyParamSet; }
public virtual 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 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 SafeBag( DerObjectIdentifier oid, Asn1Object obj, Asn1Set bagAttributes) { this.bagID = oid; this.bagValue = obj; this.bagAttributes = bagAttributes; }
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]); }
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]); }
public EncryptedContentInfo( DerObjectIdentifier contentType, AlgorithmIdentifier contentEncryptionAlgorithm, Asn1OctetString encryptedContent) { this.contentType = contentType; this.contentEncryptionAlgorithm = contentEncryptionAlgorithm; this.encryptedContent = encryptedContent; }
protected DHKeyParameters( bool isPrivate, DHParameters parameters, DerObjectIdentifier algorithmOid) : base(isPrivate) { // TODO Should we allow parameters to be null? this.parameters = parameters; this.algorithmOid = algorithmOid; }
public ECPublicKeyParameters( ECPoint q, DerObjectIdentifier publicKeyParamSet) : base("ECGOST3410", false, publicKeyParamSet) { if (q == null) throw new ArgumentNullException("q"); this.q = q.Normalize(); }
private ContentInfo( Asn1Sequence seq) { contentType = (DerObjectIdentifier) seq[0]; if (seq.Count > 1) { content = ((Asn1TaggedObject) seq[1]).GetObject(); } }
public ECPrivateKeyParameters( BigInteger d, DerObjectIdentifier publicKeyParamSet) : base("ECGOST3410", true, publicKeyParamSet) { if (d == null) throw new ArgumentNullException("d"); this.d = d; }
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 Gost3410PrivateKeyParameters( BigInteger x, DerObjectIdentifier publicKeyParamSet) : base(true, publicKeyParamSet) { if (x.SignValue < 1 || x.BitLength > 256 || x.CompareTo(Parameters.Q) >= 0) throw new ArgumentException("Invalid x for GOST3410 private key", "x"); this.x = x; }
public SmimeCapability( Asn1Sequence seq) { capabilityID = (DerObjectIdentifier) seq[0].ToAsn1Object(); if (seq.Count > 1) { parameters = seq[1].ToAsn1Object(); } }
public DHKdfParameters( DerObjectIdentifier algorithm, int keySize, byte[] z, byte[] extraInfo) { this.algorithm = algorithm; this.keySize = keySize; this.z = z; // TODO Clone? this.extraInfo = extraInfo; }
public ECPublicKeyParameters( string algorithm, ECPoint q, DerObjectIdentifier publicKeyParamSet) : base(algorithm, false, publicKeyParamSet) { if (q == null) throw new ArgumentNullException("q"); this.q = q.Normalize(); }
public DHPublicKeyParameters( BigInteger y, DHParameters parameters, DerObjectIdentifier algorithmOid) : base(false, parameters, algorithmOid) { if (y == null) throw new ArgumentNullException("y"); this.y = y; }