Skip to content

Commit c12d505

Browse files
Merge pull request #14 from VirgilSecurity/dev
Release v6.3.0
2 parents 299b5da + fa75c01 commit c12d505

16 files changed

Lines changed: 729 additions & 894 deletions

.github/workflows/build.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Build and Test
2+
on:
3+
push:
4+
branches:
5+
- "**"
6+
jobs:
7+
build:
8+
runs-on: ${{ matrix.os }}
9+
strategy:
10+
matrix:
11+
os: [ubuntu-latest, macos-13, windows-latest]
12+
php-version: ["8.2", "8.3"]
13+
include:
14+
- os: ubuntu-latest
15+
phpts: "nts"
16+
- os: macos-13
17+
phpts: "nts"
18+
- os: windows-latest
19+
phpts: "ts"
20+
steps:
21+
- uses: actions/checkout@v4
22+
- name: Install PHP ${{ matrix.php-version }}
23+
id: setup-php
24+
uses: shivammathur/setup-php@v2
25+
with:
26+
php-version: ${{ matrix.php-version }}
27+
tools: composer:v2
28+
env:
29+
update: true
30+
phpts: ${{ matrix.phpts }}
31+
- name: Check PHP Version
32+
run: php -v
33+
- name: Build and Install
34+
run: composer install
35+
- name: Run Tests
36+
if: runner.os != 'Windows'
37+
run: vendor/bin/phpunit --configuration phpunit.xml

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
vendor/
44
_dev/
55
.phpunit.result.cache
6-
tests/data/testData_*
6+
.phpunit.cache
7+
tests/data/testData_*

.travis.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

README.md

Lines changed: 20 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Virgil Crypto Library PHP
1+
# Virgil Crypto Library PHP
22

3-
[![Build Status](https://api.travis-ci.com/VirgilSecurity/virgil-crypto-php.svg?branch=master)](https://travis-ci.com/VirgilSecurity/virgil-crypto-php/)
3+
[![Build Status](https://github.com/VirgilSecurity/virgil-crypto-php/actions/workflows/build.yml/badge.svg?branch=master)](https://travis-ci.com/VirgilSecurity/virgil-crypto-php)
44
[![GitHub license](https://img.shields.io/badge/license-BSD%203--Clause-blue.svg)](https://github.com/VirgilSecurity/virgil/blob/master/LICENSE)
55
[![Latest Version on Packagist](https://img.shields.io/packagist/v/virgil/crypto.svg?style=flat-square)](https://packagist.org/packages/virgil/crypto)
66
[![Total Downloads](https://img.shields.io/packagist/dt/virgil/crypto.svg?style=flat-square)](https://packagist.org/packages/virgil/crypto)
@@ -13,17 +13,18 @@ Virgil Crypto Library PHP is a stack of security libraries (ECIES with Crypto Ag
1313

1414
## Library purposes
1515

16-
* Asymmetric Key Generation
17-
* Encryption/Decryption of data and streams
18-
* Generation/Verification of digital signatures
19-
* Double Ratchet algorithm support
20-
* **Post-quantum algorithms support**: [Round5](https://round5.org/) (encryption) and [Falcon](https://falcon-sign.info/) (signature)
21-
* Crypto for using [Virgil Core SDK](https://github.com/VirgilSecurity/virgil-sdk-php)
16+
- Asymmetric Key Generation
17+
- Encryption/Decryption of data and streams
18+
- Generation/Verification of digital signatures
19+
- Double Ratchet algorithm support
20+
- **Post-quantum algorithms support**: [Round5](https://round5.org/) (encryption) and [Falcon](https://falcon-sign.info/) (signature)
21+
- Crypto for using [Virgil Core SDK](https://github.com/VirgilSecurity/virgil-sdk-php)
2222

2323
## Installation
2424

2525
**Requirements**:
26-
- PHP 7.3 / 7.4 / 8.0
26+
27+
- PHP 8.2, 8.3
2728

2829
#### Installation via composer
2930

@@ -36,6 +37,7 @@ composer require virgil/crypto
3637
### Generate a key pair
3738

3839
Generate a key pair using the default algorithm (EC_X25519):
40+
3941
```php
4042
$crypto = new VirgilCrypto();
4143
$keyPair = $crypto->generateKeyPair();
@@ -44,6 +46,7 @@ $keyPair = $crypto->generateKeyPair();
4446
### Generate and verify a signature
4547

4648
Generate signature and sign data with a private key:
49+
4750
```php
4851
$crypto = new VirgilCrypto();
4952
$senderKeyPair = $crypto->generateKeyPair();
@@ -56,20 +59,22 @@ $signature = $crypto->generateSignature($messageToSign, $senderKeyPair->getPriva
5659
```
5760

5861
Verify a signature with a public key:
62+
5963
```php
6064
$crypto = new VirgilCrypto();
61-
62-
$senderKeyPair = $crypto->generateKeyPair();
63-
65+
66+
$senderKeyPair = $crypto->generateKeyPair();
67+
6468
// prepare a message
6569
$messageToSign = "Hello, Bob!";
6670

6771
// generate a signature
6872
$signature = $crypto->generateSignature($messageToSign, $senderKeyPair->getPrivateKey());
69-
73+
7074
// verify a signature
7175
$verified = $crypto->verifySignature($signature, $messageToSign, $senderKeyPair->getPublicKey());
7276
```
77+
7378
### Encrypt and decrypt data
7479

7580
Encrypt data with a public key:
@@ -84,6 +89,7 @@ $messageToEncrypt = "Hello, Bob!";
8489
// encrypt the message
8590
$encryptedData = $crypto->encrypt($messageToEncrypt, new VirgilPublicKeyCollection($receiverKeyPair->getPublicKey()));
8691
```
92+
8793
Decrypt the encrypted data with a private key:
8894

8995
```php
@@ -156,6 +162,7 @@ $publicKey = $crypto->importPublicKey($publicKeyData);
156162
This library is released under the [3-clause BSD License](LICENSE).
157163

158164
## Support
165+
159166
Our developer support team is here to help you. Find out more information on our [Help Center](https://help.virgilsecurity.com/).
160167

161168
You can find us on [Twitter](https://twitter.com/VirgilSecurity) or send us email support@VirgilSecurity.com.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v6.0.0
1+
v6.3.0

composer.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@
3232
}
3333
],
3434
"require": {
35-
"php": "^7.3|^8",
36-
"myclabs/php-enum": "^1.7",
37-
"virgil/crypto-wrapper": "^0.16",
35+
"php": "^8.2",
36+
"myclabs/php-enum": "^1.8",
37+
"virgil/crypto-wrapper": "^0.17",
3838
"ext-json": "*"
3939
},
4040
"require-dev": {
41-
"phpunit/phpunit": "^8"
41+
"phpunit/phpunit": "^11"
4242
},
4343
"autoload": {
4444
"psr-4": {
@@ -49,5 +49,11 @@
4949
"psr-4": {
5050
"Virgil\\CryptoTests\\": "tests/"
5151
}
52+
},
53+
"scripts": {
54+
"post-install-cmd": [
55+
"chmod +x ./vendor/virgil/crypto-wrapper/_extensions/setup.sh",
56+
"./vendor/virgil/crypto-wrapper/_extensions/setup.sh -all -vendor"
57+
]
5258
}
5359
}

0 commit comments

Comments
 (0)