Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support ArraySegment<byte>. #472

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pengweiqhca
Copy link

@pengweiqhca pengweiqhca commented Jun 28, 2023

Void memory allocate on some time.

// var array = new byte[length];
var array = ArrayPool<byte>.Shared.Rent(length); // array.Length maybe greater than length;

Asn1Sequence.GetInstance(new ArraySegment<byte>(array , 0, length));

# Conflicts:
#	crypto/src/asn1/Asn1Object.cs
#	crypto/src/asn1/DerApplicationSpecific.cs
#	crypto/src/asn1/DerGeneralizedTime.cs
#	crypto/src/asn1/DerUTCTime.cs
#	crypto/src/asn1/x509/GeneralName.cs
#	crypto/src/x509/store/X509AttrCertStoreSelector.cs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant