56 references to PkcsHelpers
System.Security.Cryptography.Pkcs (56)
Internal\Cryptography\Pal\AnyOS\ManagedPal.cs (2)
20certs.AddRange(PkcsHelpers.GetStoreCertificates(StoreName.My, StoreLocation.CurrentUser, openExistingOnly: false)); 26PkcsHelpers.GetStoreCertificates(StoreName.My, StoreLocation.LocalMachine, openExistingOnly: false));
Internal\Cryptography\Pal\AnyOS\ManagedPal.Decode.cs (1)
53unprotectedAttributes = PkcsHelpers.MakeAttributeCollection(data.UnprotectedAttributes);
Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs (4)
82List<AttributeAsn> attrList = PkcsHelpers.BuildAttributes(unprotectedAttributes); 84envelopedData.UnprotectedAttributes = PkcsHelpers.NormalizeAttributeSet(attrList.ToArray()); 147return PkcsHelpers.EncodeContentInfo(writer.Encode(), Oids.Pkcs7Enveloped); 170parameterBytes = PkcsHelpers.EncodeOctetString(alg.IV);
Internal\Cryptography\Pal\AnyOS\ManagedPal.KeyTrans.cs (1)
80if (!PkcsHelpers.TryGetRsaOaepEncryptionPadding(algorithmParameters, out encryptionPadding, out exception))
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.manual.cs (1)
8using Helpers = Internal.Cryptography.PkcsHelpers;
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (1)
278writer.WriteObjectIdentifierForCrypto(PkcsHelpers.GetOidFromHashAlgorithm(hashAlgorithm));
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (2)
62PkcsHelpers.EncodeOctetString(cert.RawData)), 87return X509CertificateLoader.LoadCertificate(PkcsHelpers.DecodeOctetString(_decoded.CertValue));
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12Info.cs (2)
57int firstValueLength = PkcsHelpers.FirstBerValueLength(encodedBytes.Span); 74authSafeBytes = PkcsHelpers.DecodeOctetStringAsMemory(pfx.AuthSafe.Content);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeBag.cs (2)
48PkcsHelpers.EnsureSingleBerValue(encodedBagValue.Span); 86List<AttributeAsn> attrs = PkcsHelpers.BuildAttributes(_attributes);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (3)
56_bags = ReadBags(PkcsHelpers.DecodeOctetStringAsMemory(contentInfoAsn.Content)); 196PkcsHelpers.EnsureSingleBerValue(secretValue.Span); 367bag.Attributes = PkcsHelpers.MakeAttributeCollection(serializedBags[i].BagAttributes);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (4)
39PkcsHelpers.EnsureSingleBerValue(algorithmParameters.Value.Span); 93PkcsHelpers.MakeAttributeCollection(privateKeyInfo.Attributes)); 271info.Attributes = PkcsHelpers.NormalizeAttributeSet(PkcsHelpers.BuildAttributes(Attributes).ToArray());
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9ContentType.cs (1)
61string contentTypeValue = PkcsHelpers.DecodeOid(rawData);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9DocumentDescription.cs (2)
72byte[] octets = PkcsHelpers.DecodeOctetString(rawData); 84return PkcsHelpers.EncodeOctetString(octets);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9DocumentName.cs (2)
72byte[] octets = PkcsHelpers.DecodeOctetString(rawData); 84return PkcsHelpers.EncodeOctetString(octets);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9LocalKeyId.cs (1)
56return PkcsHelpers.DecodeOctetString(rawData);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9MessageDigest.cs (1)
60return PkcsHelpers.DecodeOctetString(rawData);
src\libraries\Common\src\System\Security\Cryptography\Pkcs\Pkcs9SigningTime.cs (2)
77return PkcsHelpers.DecodeUtcTime(rawData); 82return PkcsHelpers.EncodeUtcTime(signingTime);
System\Security\Cryptography\Pkcs\CmsSigner.cs (5)
203HashAlgorithmName hashAlgorithmName = PkcsHelpers.GetDigestAlgorithm(DigestAlgorithm); 229List<AttributeAsn> signedAttrs = PkcsHelpers.BuildAttributes(SignedAttributes); 256signedAttrsSet.SignedAttributes = PkcsHelpers.NormalizeAttributeSet( 304List<AttributeAsn> attrs = PkcsHelpers.BuildAttributes(UnsignedAttributes); 306newSignerInfo.UnsignedAttributes = PkcsHelpers.NormalizeAttributeSet(attrs.ToArray());
System\Security\Cryptography\Pkcs\Rfc3161TimestampRequest.cs (1)
222string oidStr = PkcsHelpers.GetOidFromHashAlgorithm(hashAlgorithm);
System\Security\Cryptography\Pkcs\Rfc3161TimestampToken.cs (3)
112if (VerifyHash(hash, PkcsHelpers.GetOidFromHashAlgorithm(hashAlgorithm))) 180HashAlgorithmName hashAlgorithmName = PkcsHelpers.GetDigestAlgorithm(hashAlgorithmId); 524alg = PkcsHelpers.GetDigestAlgorithm(certId2.Value.HashAlgorithm.Algorithm);
System\Security\Cryptography\Pkcs\SignedCms.cs (5)
130return PkcsHelpers.EncodeContentInfo(writer.Encode(), Oids.Pkcs7Signed); 155return PkcsHelpers.EncodeContentInfo(attachedWriter.Encode(), Oids.Pkcs7Signed); 410PkcsHelpers.RemoveAt(ref _signedData.SignerInfos, index); 559PkcsHelpers.RemoveAt(ref _signedData.DigestAlgorithms, i); 735PkcsHelpers.RemoveAt(ref _signedData.CertificateSet, idx);
System\Security\Cryptography\Pkcs\SignerInfo.cs (8)
63_parsedSignedAttrs ??= PkcsHelpers.MakeAttributeCollection(_signedAttributes); 66_parsedUnsignedAttrs ??= PkcsHelpers.MakeAttributeCollection(_unsignedAttributes); 248PkcsHelpers.RemoveAt(ref mySigner.UnsignedAttributes!, outerIndex); 252PkcsHelpers.RemoveAt(ref mySigner.UnsignedAttributes![outerIndex].AttrValues, innerIndex); 417PkcsHelpers.RemoveAt(ref myData.UnsignedAttributes, removeAttrIdx); 422PkcsHelpers.RemoveAt(ref unsignedAttrs[removeAttrIdx].AttrValues, removeValueIndex); 644CryptographicAttributeObject obj = PkcsHelpers.MakeAttribute(attr); 814return PkcsHelpers.GetDigestAlgorithm(DigestAlgorithm.Value!, forVerification: true);
System\Security\Cryptography\Pkcs\SubjectIdentifier.cs (2)
117return PkcsHelpers.AreByteArraysEqual(certSerialNumber, serialNumber) && certificate.Issuer == issuer; 126return PkcsHelpers.AreByteArraysEqual(ski, candidateSki);