public Pkcs12PbeParams( byte[] salt, int iterations) { this.iv = new DerOctetString(salt); this.iterations = new DerInteger(iterations); }
public DataGroupHash( int dataGroupNumber, Asn1OctetString dataGroupHashValue) { this.dataGroupNumber = new DerInteger(dataGroupNumber); this.dataGroupHashValue = dataGroupHashValue; }
public RC2CbcParameter( int parameterVersion, byte[] iv) { this.version = new DerInteger(parameterVersion); this.iv = new DerOctetString(iv); }
public Cast5CbcParameters( byte[] iv, int keyLength) { this.iv = new DerOctetString(iv); this.keyLength = new DerInteger(keyLength); }
public KekIdentifier( Asn1Sequence seq) { keyIdentifier = (Asn1OctetString) seq[0]; switch (seq.Count) { case 1: break; case 2: if (seq[1] is DerGeneralizedTime) { date = (DerGeneralizedTime) seq[1]; } else { other = OtherKeyAttribute.GetInstance(seq[2]); } break; case 3: date = (DerGeneralizedTime) seq[1]; other = OtherKeyAttribute.GetInstance(seq[2]); break; default: throw new ArgumentException("Invalid KekIdentifier"); } }
public PasswordRecipientInfo( AlgorithmIdentifier keyEncryptionAlgorithm, Asn1OctetString encryptedKey) { this.version = new DerInteger(0); this.keyEncryptionAlgorithm = keyEncryptionAlgorithm; this.encryptedKey = encryptedKey; }
public KeyTransRecipientInfo( Asn1Sequence seq) { this.version = (DerInteger) seq[0]; this.rid = RecipientIdentifier.GetInstance(seq[1]); this.keyEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(seq[2]); this.encryptedKey = (Asn1OctetString) seq[3]; }
private PbeParameter(Asn1Sequence seq) { if (seq.Count != 2) throw new ArgumentException("Wrong number of elements in sequence", "seq"); salt = Asn1OctetString.GetInstance(seq[0]); iterationCount = DerInteger.GetInstance(seq[1]); }
public KekRecipientInfo( Asn1Sequence seq) { version = (DerInteger) seq[0]; kekID = KekIdentifier.GetInstance(seq[1]); keyEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(seq[2]); encryptedKey = (Asn1OctetString) seq[3]; }
public ResponderID( Asn1OctetString id) { if (id == null) throw new ArgumentNullException("id"); this.id = id; }
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 Cast5CbcParameters( Asn1Sequence seq) { if (seq.Count != 2) throw new ArgumentException("Wrong number of elements in sequence", "seq"); iv = (Asn1OctetString) seq[0]; keyLength = (DerInteger) seq[1]; }
private DataGroupHash( Asn1Sequence seq) { if (seq.Count != 2) throw new ArgumentException("Wrong number of elements in sequence", "seq"); this.dataGroupNumber = DerInteger.GetInstance(seq[0]); this.dataGroupHashValue = Asn1OctetString.GetInstance(seq[1]); }
public RecipientKeyIdentifier( byte[] subjectKeyIdentifier, DerGeneralizedTime date, OtherKeyAttribute other) { this.subjectKeyIdentifier = new DerOctetString(subjectKeyIdentifier); this.date = date; this.other = other; }
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 KekIdentifier( byte[] keyIdentifier, DerGeneralizedTime date, OtherKeyAttribute other) { this.keyIdentifier = new DerOctetString(keyIdentifier); this.date = date; this.other = other; }
public RecipientKeyIdentifier( Asn1OctetString subjectKeyIdentifier, DerGeneralizedTime date, OtherKeyAttribute other) { this.subjectKeyIdentifier = subjectKeyIdentifier; this.date = date; this.other = other; }
public EncryptedContentInfo( DerObjectIdentifier contentType, AlgorithmIdentifier contentEncryptionAlgorithm, Asn1OctetString encryptedContent) { this.contentType = contentType; this.contentEncryptionAlgorithm = contentEncryptionAlgorithm; this.encryptedContent = encryptedContent; }
public KekRecipientInfo( KekIdentifier kekID, AlgorithmIdentifier keyEncryptionAlgorithm, Asn1OctetString encryptedKey) { this.version = new DerInteger(4); this.kekID = kekID; this.keyEncryptionAlgorithm = keyEncryptionAlgorithm; this.encryptedKey = encryptedKey; }
public BiometricData( TypeOfBiometricData typeOfBiometricData, AlgorithmIdentifier hashAlgorithm, Asn1OctetString biometricDataHash) { this.typeOfBiometricData = typeOfBiometricData; this.hashAlgorithm = hashAlgorithm; this.biometricDataHash = biometricDataHash; this.sourceDataUri = null; }
internal KeyAgreeRecipientInformation( KeyAgreeRecipientInfo info, RecipientID rid, Asn1OctetString encryptedKey, CmsSecureReadable secureReadable) : base(info.KeyEncryptionAlgorithm, secureReadable) { this.info = info; this.rid = rid; this.encryptedKey = encryptedKey; }
private CertID( Asn1Sequence seq) { if (seq.Count != 4) throw new ArgumentException("Wrong number of elements in sequence", "seq"); this.hashAlgorithm = AlgorithmIdentifier.GetInstance(seq[0]); this.issuerNameHash = Asn1OctetString.GetInstance(seq[1]); this.issuerKeyHash = Asn1OctetString.GetInstance(seq[2]); this.serialNumber = DerInteger.GetInstance(seq[3]); }
public CertID( AlgorithmIdentifier hashAlgorithm, Asn1OctetString issuerNameHash, Asn1OctetString issuerKeyHash, DerInteger serialNumber) { this.hashAlgorithm = hashAlgorithm; this.issuerNameHash = issuerNameHash; this.issuerKeyHash = issuerKeyHash; this.serialNumber = serialNumber; }
public ResponseBytes( DerObjectIdentifier responseType, Asn1OctetString response) { if (responseType == null) throw new ArgumentNullException("responseType"); if (response == null) throw new ArgumentNullException("response"); this.responseType = responseType; this.response = response; }
public KeyAgreeRecipientInfo( OriginatorIdentifierOrKey originator, Asn1OctetString ukm, AlgorithmIdentifier keyEncryptionAlgorithm, Asn1Sequence recipientEncryptedKeys) { this.version = new DerInteger(3); this.originator = originator; this.ukm = ukm; this.keyEncryptionAlgorithm = keyEncryptionAlgorithm; this.recipientEncryptedKeys = recipientEncryptedKeys; }
public EncryptedContentInfo( Asn1Sequence seq) { contentType = (DerObjectIdentifier) seq[0]; contentEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(seq[1]); if (seq.Count > 2) { encryptedContent = Asn1OctetString.GetInstance( (Asn1TaggedObject) seq[2], false); } }
private BiometricData( Asn1Sequence seq) { typeOfBiometricData = TypeOfBiometricData.GetInstance(seq[0]); hashAlgorithm = AlgorithmIdentifier.GetInstance(seq[1]); biometricDataHash = Asn1OctetString.GetInstance(seq[2]); if (seq.Count > 3) { sourceDataUri = DerIA5String.GetInstance(seq[3]); } }
private static ICollection GetAlternativeName( Asn1OctetString extVal) { IList temp = Platform.CreateArrayList(); if (extVal != null) { try { Asn1Sequence seq = DerSequence.GetInstance(FromExtensionValue(extVal)); foreach (GeneralName genName in seq) { IList list = Platform.CreateArrayList(); list.Add(genName.TagNo); switch (genName.TagNo) { case GeneralName.EdiPartyName: case GeneralName.X400Address: case GeneralName.OtherName: list.Add(genName.Name.ToAsn1Object()); break; case GeneralName.DirectoryName: list.Add(X509Name.GetInstance(genName.Name).ToString()); break; case GeneralName.DnsName: case GeneralName.Rfc822Name: case GeneralName.UniformResourceIdentifier: list.Add(((IAsn1String)genName.Name).GetString()); break; case GeneralName.RegisteredID: list.Add(DerObjectIdentifier.GetInstance(genName.Name).Id); break; case GeneralName.IPAddress: list.Add(DerOctetString.GetInstance(genName.Name).GetOctets()); break; default: throw new IOException("Bad tag number: " + genName.TagNo); } temp.Add(list); } } catch (Exception e) { throw new CertificateParsingException(e.Message); } } return temp; }
private RC2CbcParameter( Asn1Sequence seq) { if (seq.Count == 1) { iv = (Asn1OctetString)seq[0]; } else { version = (DerInteger)seq[0]; iv = (Asn1OctetString)seq[1]; } }
public PasswordRecipientInfo( Asn1Sequence seq) { version = (DerInteger) seq[0]; if (seq[1] is Asn1TaggedObject) { keyDerivationAlgorithm = AlgorithmIdentifier.GetInstance((Asn1TaggedObject) seq[1], false); keyEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(seq[2]); encryptedKey = (Asn1OctetString) seq[3]; } else { keyEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(seq[1]); encryptedKey = (Asn1OctetString) seq[2]; } }