Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yocto/yoclib-multibase-php
PHP yocLib for Multibase of the Multiformats project
https://github.com/yocto/yoclib-multibase-php
multibase multiformats php yoclib
Last synced: 3 months ago
JSON representation
PHP yocLib for Multibase of the Multiformats project
- Host: GitHub
- URL: https://github.com/yocto/yoclib-multibase-php
- Owner: yocto
- License: gpl-3.0
- Created: 2021-11-21T17:59:33.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-06-05T13:49:05.000Z (7 months ago)
- Last Synced: 2024-09-06T00:48:41.219Z (4 months ago)
- Topics: multibase, multiformats, php, yoclib
- Language: PHP
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# yocLib - Multibase (PHP)
This yocLibrary enables your project to encode and decode Multibases in PHP.
## Status
[![PHP Composer](https://github.com/yocto/yoclib-multibase-php/actions/workflows/php.yml/badge.svg)](https://github.com/yocto/yoclib-multibase-php/actions/workflows/php.yml)
[![codecov](https://codecov.io/gh/yocto/yoclib-multibase-php/graph/badge.svg?token=CVJJGTZJ1X)](https://codecov.io/gh/yocto/yoclib-multibase-php)## Installation
`composer require yocto/yoclib-multibase`
## Usage
### Encoding
```php
use YOCLIB\Multiformats\Multibase\Multibase;$text = 'Hello world!';
$encodedString = Multibase::encode(Multibase::BASE16UPPER,$text);
```### Decoding
```php
use YOCLIB\Multiformats\Multibase\Multibase;$encodedString = 'F48656C6C6F20776F726C6421';
$text = Multibase::decode($encodedString);
```