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 encoding scheme as a template argument to types #27

Open
Samuel-Tyler opened this issue May 9, 2020 · 0 comments
Open

Add encoding scheme as a template argument to types #27

Samuel-Tyler opened this issue May 9, 2020 · 0 comments

Comments

@Samuel-Tyler
Copy link
Owner

Currently all types are encoded / decoded as ber. A NTTP should be added to each ASN.1 type which allows the user to specify expected encoding scheme. An enum class should be defined to select the scheme. The encoding should be defined for types to allow optimised storage of their encoding.

Expected format:

enum class Asn1Encoding
{
    ber,
    der,
    cer,
    ...
};


template <Asn1Encoding encoding = Asn1Encoding::ber, typename Identifier = ExplicitId<UniversalTag::integer>>
class Integer
{
     ...
};
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

No branches or pull requests

1 participant