15 algorithmIdentifierWriter.
CopyTo(asnWriter);
18 privateKeyWriter.
CopyTo(asnWriter);
20 attributesWriter?.CopyTo(asnWriter);
40 Span<byte> span2 = stackalloc
byte[cipher.BlockSize / 8];
110 if (bytesRead != current.
Length)
115 asnWriter.WriteEncodedValueForCrypto(arraySegment);
134 if (bytesRead != current.
Length)
139 asnWriter.WriteEncodedValueForCrypto(arraySegment);
static string Cryptography_Der_Invalid_Encoding
static string Cryptography_Pkcs8_EncryptedReadFailed
static void Return(byte[] array, int clearSize=-1)
static byte[] Rent(int minimumLength)
static void ZeroMemory(Span< byte > buffer)
static void InitiateEncryption(PbeParameters pbeParameters, out SymmetricAlgorithm cipher, out string hmacOid, out string encryptionAlgorithmOid, out bool isPkcs12)
static unsafe int Encrypt(ReadOnlySpan< char > password, ReadOnlySpan< byte > passwordBytes, SymmetricAlgorithm cipher, bool isPkcs12, AsnWriter source, PbeParameters pbeParameters, ReadOnlySpan< byte > salt, byte[] destination, Span< byte > ivDest)
static unsafe int Decrypt(in AlgorithmIdentifierAsn algorithmIdentifier, ReadOnlySpan< char > password, ReadOnlySpan< byte > passwordBytes, ReadOnlySpan< byte > encryptedData, Span< byte > destination)
static void WritePbeAlgorithmIdentifier(AsnWriter writer, bool isPkcs12, string encryptionAlgorithmOid, Span< byte > salt, int iterationCount, string hmacOid, Span< byte > iv)
static void Fill(Span< byte > data)
unsafe ReadOnlySpan< T > Span
static void Decode(ref AsnValueReader reader, ReadOnlyMemory< byte > rebind, out EncryptedPrivateKeyInfoAsn decoded)
AlgorithmIdentifierAsn EncryptionAlgorithm
ReadOnlyMemory< byte > EncryptedData