46 references to PkcsHelpers
System.Security.Cryptography.Pkcs (46)
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 (1)
8using Helpers = Internal.Cryptography.PkcsHelpers;
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 X509CertificateLoader.LoadCertificate(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)
130return PkcsHelpers.EncodeContentInfo(writer.Encode(), Oids.Pkcs7Signed); 155return PkcsHelpers.EncodeContentInfo(attachedWriter.Encode(), Oids.Pkcs7Signed); 405PkcsHelpers.RemoveAt(ref _signedData.SignerInfos, index); 554PkcsHelpers.RemoveAt(ref _signedData.DigestAlgorithms, i); 720PkcsHelpers.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); 788return PkcsHelpers.GetDigestAlgorithm(DigestAlgorithm.Value!, forVerification: true); 813valueColl.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);