Download the PHP package jamielsharief/encryption without Composer

On this page you can find all versions of the php package jamielsharief/encryption. 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 encryption

Encryption

license build Coverage Status

This library supports both asymmetric (using key pairs) and symmetric (single key) encryption. There is also a Hybrid encryption which uses both asymmetric and symmetric. Both encrypted data and signatures are returned as a Base64 encoded string.

Asymmetric Encryption

Generating Keys

To generate a key pair

Generate accepts the following options:

Working with Private Keys

To create a PrivateKey object using a private key string, pass this to the constructor

To create a PrivateKey object by loading from a file

Things you can do with the PrivateKey object

You can also generate a private key using the static method generate, this will return a new PrivateKey object.

Working with Public Keys

To create a PublicKey object using a public key string, pass this to the constructor

To create a PublicKey object by loading from a file

Things you can do with the PublicKey object

Keychain

You can also manage keys with Keychain

Creating keys and adding to the Key Chain

To create a private and public key pair and add this to the Keychain, you can pass an email address, username, UUID or any other unique id.

You can also set an expiry date for the key

Adding

When you add a private key, the public key will be extracted and added to the same document.

To add a private or public key from a string.

Importing

When you add a private key, the public key will be extracted and added to the same document.

To import an existing public key or private/public key pair

You can also set an expiry date for the key

Get

To get a key and data

Delete

To delete a key and data

List

To get a list of keys

Symmetric Encryption

First you will need to generate a key that is 256 bit/32 bytes

To encrypt a string

To decrypt a string

Hybrid Encryption

This can only decrypt data encrypted with the Hybrid Encryption class

Hybrid encryption uses both asymmetric and symmetric encryption. With hybrid encryption there is no limit on message size.

By default encrypted/signed data is wrapped in a ENCRYPTED DATA or SIGNATURE boundary, however this can be disabled when encrypting or signing data. For example

Decryption and signature verification will remove boundaries automatically if they are found present in the data.


All versions of encryption with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3.0
jamielsharief/document-store Version ^1.0
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 jamielsharief/encryption contains the following files

Loading the files please wait ....