Is there a free package for reading, manipulating and writing ASN.1 in Java?
It must be:
- Free
- Lightweight
- Self-contained (without external dependencies on, e.g. Apache commons)
- Java 5 (not Java 6), and Java 4 is preferred.
Is there a free package for reading, manipulating and writing ASN.1 in Java?
It must be:
The following project looks promising:
http://www.chaosinmotion.com/wiki/index.php?title=ASN.1_Library
It is provided under a liberal BSD-style licence.
It is small, 41 classes compiling to 55KiB.
It compiled clean with no dependencies to Java 3.
The free BouncyCastle library provides low-level ASN.1 parsing. You don't need to install BC as a provider to use the ASN.1 capabilities. It has different versions for 1.4 and up. It has no external dependencies. As the default bundle contains all of the BC provider classes, you may want to repackage it if you want something more compact.
You could use jASN1. It is licensed under LGPL and should satisfy all of your needs. It is also very efficient.
I need to be able to parse any kind of ASN.1 data in krypt. Although krypt is a Ruby project, you may want to have a look at the JRuby extension - the code for handling ASN.1 parsing/encoding is written entirely in Java and modular enough for easy extraction.
I also made a Java-only version, but it is missing some of the higher-level functionality of the former. But since it's concise, maybe it's a good opportunity to get you started.
Both are free of any additional dependencies and use only standard JDK functionality.
I had basically the same set of requirements and found this asn-one - ASN.1 library for Java perfect for my case.
© 2022 - 2024 — McMap. All rights reserved.