Comments (4)
I found it very odd how encodedBytes
is exposed. From what I can see it's the memoized result from encode()
. It seems like it should be a private implementation detail?
Also throws off people switching from the ASN1Lib package, since their encodedBytes
should be changed to encode()
.
Edit:
The encoding from ASN1Integer(BigInt.from(0)) differs from the current ASN1Lib package and is maybe buggy
Yes I have found the same problem.
Also, seems like the implementation mentions:
Uint8List encodeBigInt(BigInt number) {
// Not handling negative numbers. Decide how you want to do that.
Not too sure how important that is, but I suppose it should be decided before 2.0.0
stable?
from pc-dart.
@mwcw @gnawf
I created a PR to fix the above mentioned things.
from pc-dart.
Related to Ephenodrom/Dart-Basic-Utils#31...
asn1lib
code to pointycastle
.
Consider the following:
pc-dart/lib/asn1/primitives/asn1_bit_string.dart
Lines 31 to 36 in e5cd4dd
Is tag
really something that would/could/should be changed? Why not hard-code it like:
ASN1BitString(
{this.stringValues, this.elements})
: super(tag: ASN1Tags.BIT_STRING);
?
Migrating from asn1lib1
requires specifying the named parameter, which seems excessive for most use-cases. And does it really make sense to potentially have stringValues
and elements
? Maybe multiple constructors or factory methods to handle different use-cases makes more sense? Like:
ASN1BitString(this.stringValues) : super(tag: ASN1Tags.BIT_STRING);
ASN1BitString.fromElements(this.elements) : super(tag: ASN1Tags.BIT_STRING);
?
from pc-dart.
Improvements are already merged. Complaints cannot be traced, because the effort for a change is limited.
from pc-dart.
Related Issues (20)
- Question about AES/CBC speed HOT 7
- Decrypt RSA-OAEP (SHA-256) with label
- RIPEMD160 digest was broken in version 3.6.2 HOT 5
- Uint64List not supported in web mode HOT 7
- How can I do that ? ? (AES)
- PKCS12 Support HOT 3
- AES-GCM - 3 distinct decryption/encryption issues in processBytes(), if called multiple times (e.g. for stream) before doFinal()
- ECIES Encrypt/Decrypt
- Checksum
- Missing stuff from Java HOT 1
- Import conflicts with version 3.7.2 HOT 1
- Incorrect api interface for PSSSigner HOT 5
- ECDSA verifier HOT 1
- Poly1305 support for web
- New release HOT 4
- Create x509 certificate HOT 1
- PKCS12 Support HOT 1
- Converting ECPrivateKey SEC1 to PCKS8
- Bug in CMAC with AES256 key
- [proposed label: documentation] Is the implementation of the OAEPEncoding class really incompatible with PKCS#1 v2.1 or later? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pc-dart.