Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pgaultier/vbx-php
https://github.com/pgaultier/vbx-php
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/pgaultier/vbx-php
- Owner: pgaultier
- License: other
- Created: 2024-05-16T14:40:40.000Z (8 months ago)
- Default Branch: devel
- Last Pushed: 2024-05-16T14:42:21.000Z (8 months ago)
- Last Synced: 2024-12-05T20:08:26.952Z (23 days ago)
- Language: PHP
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
VB Backports
============VB Backports is a collection of tools we encountered while modernizing old VB5/6 projects
We needed to port some of the code to PHP.Installation
------------If you use Packagist for installing packages, then you can update your composer.json like this :
``` json
{
"require": {
"pgaultier/vbx-php": "*"
}
}
```Components backported
---------------------### Rnd
The PRNG Rnd function available in VB5/6 is not available in PHP.
``` php
$vbRandomizer = new Rnd();$vbRandomizer->rnd(-1);
$seed = 1500;
$vbRandomizer->randomize($seed);$randomNumber = $vbRandomizer->rnd();
```### ClsEncrypt
Original VB code created by Michael Ciurescu (CVMichael from vbforums.com)
https://www.vbforums.com/showthread.php?231798-VB-31-Bit-Encryption-function
```php
$clsEncrypt = new ClsEncrypt();
$password = 'secret key';
$string = 'Hello World';$encryptedBinaryString = $clsEncrypt->rndCryptLevel2($string, $password);
$decryptedString = $clsEncrypt->rndDecryptLevel2($encryptedBinaryString, $password);
// $decryptedString == 'Hello World'
```Contributing
------------All code contributions - including those of people having commit access -
must go through a pull request and approved by a core developer before being
merged. This is to ensure proper review of all the code.Fork the project, create a [feature branch ](http://nvie.com/posts/a-successful-git-branching-model/), and send us a pull request.