Download the PHP package uma/phpasn1 without Composer

On this page you can find all versions of the php package uma/phpasn1. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package phpasn1

PHPASN1

PHPUnit Latest Stable Version Total Downloads License


This is a fork to support uma/phpecc and in turn nostrver-se/nostr-php. Should be considered abandoned, exactly like upstream.


Notice: This library is no longer actively maintained!

If you are currently using PHPASN1, this might not be an immediate problem for you, since this library was always rather stable.

However, you are advised to migrate to alternative packages to ensure that your applications remain functional also with newer PHP versions.

Another option is to fork this repository or use one of the existing forks.

If you are using another fork, please make sure you trust the author and validate the code you are relying upon!


A PHP Framework that allows you to encode and decode arbitrary ASN.1 structures using the ITU-T X.690 Encoding Rules. This encoding is very frequently used in X.509 PKI environments or the communication between heterogeneous computer systems.

The API allows you to encode ASN.1 structures to create binary data such as certificate signing requests (CSR), X.509 certificates or certificate revocation lists (CRL). PHPASN1 can also read BER encoded binary data into separate PHP objects that can be manipulated by the user and reencoded afterwards.

The changelog can now be found at CHANGELOG.md.

Dependencies

PHPASN1 requires at least PHP 7.0 and either the gmp or bcmath extension. Support for older PHP versions (i.e. PHP 5.6) was dropped starting with v2.0. If you must use an outdated PHP version consider using PHPASN v1.5.

For the loading of object identifier names directly from the web curl is used.

Installation

The preferred way to install this library is to rely on Composer:

Usage

Encoding ASN.1 Structures

PHPASN1 offers you a class for each of the implemented ASN.1 universal types. The constructors should be pretty self explanatory so you should have no big trouble getting started. All data will be encoded using DER encoding

Decoding binary data

Decoding BER encoded binary data is just as easy as encoding it:

If you already know exactly how your expected data should look like you can use the FG\ASN1\TemplateParser:

You can use this function to make sure your data has exactly the format you are expecting.

Navigating decoded data

All constructed classes (i.e. Sequence and Set) can be navigated by array access or using an iterator. You can find examples here, here and here.

Give me more examples!

To see some example usage of the API classes or some generated output check out the examples.

How do I contribute?

This project is no longer maintained and thus does not accept any new contributions.

Thanks

To all contributors so far!

License

This library is distributed under the MIT License.


All versions of phpasn1 with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package uma/phpasn1 contains the following files

Loading the files please wait ....