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