46 references to PkcsHelpers
System.Security.Cryptography.Pkcs (46)
Internal\Cryptography\Pal\AnyOS\ManagedPal.cs (2)
20
certs.AddRange(
PkcsHelpers
.GetStoreCertificates(StoreName.My, StoreLocation.CurrentUser, openExistingOnly: false));
26
PkcsHelpers
.GetStoreCertificates(StoreName.My, StoreLocation.LocalMachine, openExistingOnly: false));
Internal\Cryptography\Pal\AnyOS\ManagedPal.Encrypt.cs (3)
83
envelopedData.UnprotectedAttributes =
PkcsHelpers
.NormalizeAttributeSet(attrList.ToArray());
146
return
PkcsHelpers
.EncodeContentInfo(writer.Encode(), Oids.Pkcs7Enveloped);
169
parameterBytes =
PkcsHelpers
.EncodeOctetString(alg.IV);
Internal\Cryptography\Pal\AnyOS\ManagedPal.KeyTrans.cs (1)
79
if (!
PkcsHelpers
.TryGetRsaOaepEncryptionPadding(algorithmParameters, out encryptionPadding, out exception))
src\libraries\Common\src\System\Security\Cryptography\Asn1\Pkcs12\PfxAsn.manual.cs (1)
8
using Helpers = Internal.Cryptography.
PkcsHelpers
;
System\Security\Cryptography\Pkcs\CmsSigner.cs (3)
183
HashAlgorithmName hashAlgorithmName =
PkcsHelpers
.GetDigestAlgorithm(DigestAlgorithm);
236
signedAttrsSet.SignedAttributes =
PkcsHelpers
.NormalizeAttributeSet(
286
newSignerInfo.UnsignedAttributes =
PkcsHelpers
.NormalizeAttributeSet(attrs.ToArray());
System\Security\Cryptography\Pkcs\Pkcs12Builder.cs (1)
272
writer.WriteObjectIdentifierForCrypto(
PkcsHelpers
.GetOidFromHashAlgorithm(hashAlgorithm));
System\Security\Cryptography\Pkcs\Pkcs12CertBag.cs (2)
55
PkcsHelpers
.EncodeOctetString(cert.RawData)),
79
return X509CertificateLoader.LoadCertificate(
PkcsHelpers
.DecodeOctetString(_decoded.CertValue));
System\Security\Cryptography\Pkcs\Pkcs12Info.cs (2)
52
int firstValueLength =
PkcsHelpers
.FirstBerValueLength(encodedBytes.Span);
69
authSafeBytes =
PkcsHelpers
.DecodeOctetStringAsMemory(pfx.AuthSafe.Content);
System\Security\Cryptography\Pkcs\Pkcs12SafeBag.cs (1)
42
PkcsHelpers
.EnsureSingleBerValue(encodedBagValue.Span);
System\Security\Cryptography\Pkcs\Pkcs12SafeContents.cs (2)
51
_bags = ReadBags(
PkcsHelpers
.DecodeOctetStringAsMemory(contentInfoAsn.Content));
191
PkcsHelpers
.EnsureSingleBerValue(secretValue.Span);
System\Security\Cryptography\Pkcs\Pkcs8PrivateKeyInfo.cs (2)
33
PkcsHelpers
.EnsureSingleBerValue(algorithmParameters.Value.Span);
265
info.Attributes =
PkcsHelpers
.NormalizeAttributeSet(CmsSigner.BuildAttributes(Attributes).ToArray());
System\Security\Cryptography\Pkcs\Pkcs9ContentType.cs (1)
55
string contentTypeValue =
PkcsHelpers
.DecodeOid(rawData);
System\Security\Cryptography\Pkcs\Pkcs9DocumentDescription.cs (2)
66
byte[] octets =
PkcsHelpers
.DecodeOctetString(rawData);
78
return
PkcsHelpers
.EncodeOctetString(octets);
System\Security\Cryptography\Pkcs\Pkcs9DocumentName.cs (2)
66
byte[] octets =
PkcsHelpers
.DecodeOctetString(rawData);
78
return
PkcsHelpers
.EncodeOctetString(octets);
System\Security\Cryptography\Pkcs\Pkcs9LocalKeyId.cs (1)
50
return
PkcsHelpers
.DecodeOctetString(rawData);
System\Security\Cryptography\Pkcs\Pkcs9MessageDigest.cs (1)
54
return
PkcsHelpers
.DecodeOctetString(rawData);
System\Security\Cryptography\Pkcs\Pkcs9SigningTime.cs (2)
71
return
PkcsHelpers
.DecodeUtcTime(rawData);
76
return
PkcsHelpers
.EncodeUtcTime(signingTime);
System\Security\Cryptography\Pkcs\Rfc3161TimestampRequest.cs (1)
222
string oidStr =
PkcsHelpers
.GetOidFromHashAlgorithm(hashAlgorithm);
System\Security\Cryptography\Pkcs\Rfc3161TimestampToken.cs (3)
112
if (VerifyHash(hash,
PkcsHelpers
.GetOidFromHashAlgorithm(hashAlgorithm)))
180
HashAlgorithmName hashAlgorithmName =
PkcsHelpers
.GetDigestAlgorithm(hashAlgorithmId);
524
alg =
PkcsHelpers
.GetDigestAlgorithm(certId2.Value.HashAlgorithm.Algorithm);
System\Security\Cryptography\Pkcs\SignedCms.cs (5)
130
return
PkcsHelpers
.EncodeContentInfo(writer.Encode(), Oids.Pkcs7Signed);
155
return
PkcsHelpers
.EncodeContentInfo(attachedWriter.Encode(), Oids.Pkcs7Signed);
405
PkcsHelpers
.RemoveAt(ref _signedData.SignerInfos, index);
554
PkcsHelpers
.RemoveAt(ref _signedData.DigestAlgorithms, i);
720
PkcsHelpers
.RemoveAt(ref _signedData.CertificateSet, idx);
System\Security\Cryptography\Pkcs\SignerInfo.cs (6)
230
PkcsHelpers
.RemoveAt(ref mySigner.UnsignedAttributes!, outerIndex);
234
PkcsHelpers
.RemoveAt(ref mySigner.UnsignedAttributes![outerIndex].AttrValues, innerIndex);
399
PkcsHelpers
.RemoveAt(ref myData.UnsignedAttributes, removeAttrIdx);
404
PkcsHelpers
.RemoveAt(ref unsignedAttrs[removeAttrIdx].AttrValues, removeValueIndex);
788
return
PkcsHelpers
.GetDigestAlgorithm(DigestAlgorithm.Value!, forVerification: true);
813
valueColl.Add(
PkcsHelpers
.CreateBestPkcs9AttributeObjectAvailable(type, attrValue.ToArray()));
System\Security\Cryptography\Pkcs\SubjectIdentifier.cs (2)
111
return
PkcsHelpers
.AreByteArraysEqual(certSerialNumber, serialNumber) && certificate.Issuer == issuer;
120
return
PkcsHelpers
.AreByteArraysEqual(ski, candidateSki);