48 references to PkcsHelpers
System.Security.Cryptography.Pkcs (48)
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.Encrypt.cs (3)
83envelopedData.UnprotectedAttributes = PkcsHelpers.NormalizeAttributeSet(attrList.ToArray()); 146return PkcsHelpers.EncodeContentInfo(writer.Encode(), Oids.Pkcs7Enveloped); 169parameterBytes = PkcsHelpers.EncodeOctetString(alg.IV);
Internal\Cryptography\Pal\AnyOS\ManagedPal.KeyTrans.cs (1)
79if (!PkcsHelpers.TryGetRsaOaepEncryptionPadding(algorithmParameters, out encryptionPadding, out exception))
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.manual.cs (3)
12using Helpers = Internal.Cryptography.PkcsHelpers; 117ReadOnlyMemory<byte> authSafeContents = Helpers.DecodeOctetStringAsMemory(AuthSafe.Content); 159contentData = Helpers.DecodeOctetStringAsMemory(contentInfo.Content);
System\Security\Cryptography\Pkcs\CmsSigner.cs (3)
183HashAlgorithmName hashAlgorithmName = PkcsHelpers.GetDigestAlgorithm(DigestAlgorithm); 236signedAttrsSet.SignedAttributes = PkcsHelpers.NormalizeAttributeSet( 286newSignerInfo.UnsignedAttributes = PkcsHelpers.NormalizeAttributeSet(attrs.ToArray());
System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (1)
272writer.WriteObjectIdentifierForCrypto(PkcsHelpers.GetOidFromHashAlgorithm(hashAlgorithm));
System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (2)
55PkcsHelpers.EncodeOctetString(cert.RawData)), 79return new X509Certificate2(PkcsHelpers.DecodeOctetString(_decoded.CertValue));
System\Security\Cryptography\Pkcs\Pkcs12Info.cs (2)
52int firstValueLength = PkcsHelpers.FirstBerValueLength(encodedBytes.Span); 69authSafeBytes = PkcsHelpers.DecodeOctetStringAsMemory(pfx.AuthSafe.Content);
System\Security\Cryptography\Pkcs\Pkcs12SafeBag.cs (1)
42PkcsHelpers.EnsureSingleBerValue(encodedBagValue.Span);
System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (2)
51_bags = ReadBags(PkcsHelpers.DecodeOctetStringAsMemory(contentInfoAsn.Content)); 191PkcsHelpers.EnsureSingleBerValue(secretValue.Span);
System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (2)
33PkcsHelpers.EnsureSingleBerValue(algorithmParameters.Value.Span); 265info.Attributes = PkcsHelpers.NormalizeAttributeSet(CmsSigner.BuildAttributes(Attributes).ToArray());
System\Security\Cryptography\Pkcs\Pkcs9ContentType.cs (1)
55string contentTypeValue = PkcsHelpers.DecodeOid(rawData);
System\Security\Cryptography\Pkcs\Pkcs9DocumentDescription.cs (2)
66byte[] octets = PkcsHelpers.DecodeOctetString(rawData); 78return PkcsHelpers.EncodeOctetString(octets);
System\Security\Cryptography\Pkcs\Pkcs9DocumentName.cs (2)
66byte[] octets = PkcsHelpers.DecodeOctetString(rawData); 78return PkcsHelpers.EncodeOctetString(octets);
System\Security\Cryptography\Pkcs\Pkcs9LocalKeyId.cs (1)
50return PkcsHelpers.DecodeOctetString(rawData);
System\Security\Cryptography\Pkcs\Pkcs9MessageDigest.cs (1)
54return PkcsHelpers.DecodeOctetString(rawData);
System\Security\Cryptography\Pkcs\Pkcs9SigningTime.cs (2)
71return PkcsHelpers.DecodeUtcTime(rawData); 76return PkcsHelpers.EncodeUtcTime(signingTime);
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)
136return PkcsHelpers.EncodeContentInfo(writer.Encode(), Oids.Pkcs7Signed); 161return PkcsHelpers.EncodeContentInfo(attachedWriter.Encode(), Oids.Pkcs7Signed); 411PkcsHelpers.RemoveAt(ref _signedData.SignerInfos, index); 560PkcsHelpers.RemoveAt(ref _signedData.DigestAlgorithms, i); 726PkcsHelpers.RemoveAt(ref _signedData.CertificateSet, idx);
System\Security\Cryptography\Pkcs\SignerInfo.cs (6)
230PkcsHelpers.RemoveAt(ref mySigner.UnsignedAttributes!, outerIndex); 234PkcsHelpers.RemoveAt(ref mySigner.UnsignedAttributes![outerIndex].AttrValues, innerIndex); 399PkcsHelpers.RemoveAt(ref myData.UnsignedAttributes, removeAttrIdx); 404PkcsHelpers.RemoveAt(ref unsignedAttrs[removeAttrIdx].AttrValues, removeValueIndex); 780return PkcsHelpers.GetDigestAlgorithm(DigestAlgorithm.Value!, forVerification: true); 805valueColl.Add(PkcsHelpers.CreateBestPkcs9AttributeObjectAvailable(type, attrValue.ToArray()));
System\Security\Cryptography\Pkcs\SubjectIdentifier.cs (2)
111return PkcsHelpers.AreByteArraysEqual(certSerialNumber, serialNumber) && certificate.Issuer == issuer; 120return PkcsHelpers.AreByteArraysEqual(ski, candidateSki);