本文整理汇总了C#中Org.BouncyCastle.Asn1.Asn1OctetString类的典型用法代码示例。如果您正苦于以下问题:C# Asn1OctetString类的具体用法?C# Asn1OctetString怎么用?C# Asn1OctetString使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Asn1OctetString类属于Org.BouncyCastle.Asn1命名空间,在下文中一共展示了Asn1OctetString类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: RecipientKeyIdentifier
public RecipientKeyIdentifier(
Asn1Sequence seq)
{
subjectKeyIdentifier = Asn1OctetString.GetInstance(
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 RecipientKeyIdentifier");
}
}
示例2: DataGroupHash
public DataGroupHash(
int dataGroupNumber,
Asn1OctetString dataGroupHashValue)
{
this.dataGroupNumber = new DerInteger(dataGroupNumber);
this.dataGroupHashValue = dataGroupHashValue;
}
示例3: KeyTransRecipientInfo
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];
}
示例4: IdeaCbcPar
private IdeaCbcPar(
Asn1Sequence seq)
{
if (seq.Count == 1)
{
iv = (Asn1OctetString) seq[0];
}
}
示例5: KekRecipientInfo
public KekRecipientInfo(
Asn1Sequence seq)
{
version = (DerInteger) seq[0];
kekID = KekIdentifier.GetInstance(seq[1]);
keyEncryptionAlgorithm = AlgorithmIdentifier.GetInstance(seq[2]);
encryptedKey = (Asn1OctetString) seq[3];
}
示例6: PasswordRecipientInfo
public PasswordRecipientInfo(
AlgorithmIdentifier keyEncryptionAlgorithm,
Asn1OctetString encryptedKey)
{
this.version = new DerInteger(0);
this.keyEncryptionAlgorithm = keyEncryptionAlgorithm;
this.encryptedKey = encryptedKey;
}
示例7: PbeParameter
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]);
}
示例8: ResponderID
public ResponderID(
Asn1OctetString id)
{
if (id == null)
throw new ArgumentNullException("id");
this.id = id;
}
示例9: Cast5CbcParameters
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];
}
示例10: ResponseBytes
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]);
}
示例11: EncryptedContentInfo
public EncryptedContentInfo(
DerObjectIdentifier contentType,
AlgorithmIdentifier contentEncryptionAlgorithm,
Asn1OctetString encryptedContent)
{
this.contentType = contentType;
this.contentEncryptionAlgorithm = contentEncryptionAlgorithm;
this.encryptedContent = encryptedContent;
}
示例12: Gost28147Parameters
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]);
}
示例13: BiometricData
public BiometricData(
TypeOfBiometricData typeOfBiometricData,
AlgorithmIdentifier hashAlgorithm,
Asn1OctetString biometricDataHash)
{
this.typeOfBiometricData = typeOfBiometricData;
this.hashAlgorithm = hashAlgorithm;
this.biometricDataHash = biometricDataHash;
this.sourceDataUri = null;
}
示例14: Pkcs12PbeParams
public Pkcs12PbeParams(
byte[] salt,
int iterations)
{
this.iv = new DerOctetString(salt);
this.iterations = new DerInteger(iterations);
}
示例15: RC2CbcParameter
public RC2CbcParameter(
int parameterVersion,
byte[] iv)
{
this.version = new DerInteger(parameterVersion);
this.iv = new DerOctetString(iv);
}