-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Corey Bonnell
committed
Dec 28, 2023
1 parent
0b71315
commit 98a338c
Showing
2 changed files
with
42 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,35 @@ | ||
# pyasn1-fasder | ||
# pyasn1-fasder | ||
|
||
|
||
[![PyPI](https://img.shields.io/pypi/v/pyasn1-fasder)](https://pypi.org/project/pyasn1-fasder) | ||
[![Python Versions](https://img.shields.io/pypi/pyversions/pyasn1-fasder)](https://pypi.org/project/pyasn1-fasder/) | ||
[![Build status](https://github.com/cbonnell/pyasn1-fasder/actions/workflows/CI.yml/badge.svg)](https://github.com/cbonnell/pyasn1-fasder/actions/workflows/CI.yml) | ||
[![GitHub license](https://img.shields.io/pypi/l/pyasn1-fasder)](https://raw.githubusercontent.com/cbonnell/pyasn1-fasder/main/LICENSE) | ||
|
||
pyasn1-fasder is a DER decoder for pyasn1 with a focus on performance (relative to the decoder included with pyasn1) and | ||
checking the correctness of encoding. This decoder is more pedantic than most other decoders in terms of flagging DER | ||
encoding errors, and this behavior is unlikely to change. | ||
|
||
## Installation | ||
|
||
`pip install pyasn1-fasder` | ||
|
||
## Usage | ||
|
||
pyasn1-fasder exposes a single function: `decode_der`. The signature and return type are the same as the pyasn1 `decode` function, as it is intended to be a drop-in replacement of `pyasn1.codec.der.decoder.decode`. | ||
|
||
## Limitations | ||
|
||
* There is no encoding counterpart. | ||
* Trailing octets present after the `substrate` TLV are not tolerated and will result in an exception being raised. In other words, the `rest` component of the tuple return value will always be an empty `bytes` object. | ||
* Schemaless decoding is not supported. In other words, a non-`None` `asn1Spec` must be passed to `decode_der`. | ||
* `Set`s with `namedValues` are not supported. These are (almost?) never used in cryptography standards, but support can be added if there are valid use cases. | ||
* The pedantic checks for correctness of encoding cannot be disabled. | ||
|
||
## Bugs? | ||
|
||
Please create a Github issue. | ||
|
||
## Contributing | ||
|
||
Contributions for bug fixes and new features are welcome. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters