Skip to content
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.

Commit

Permalink
Merge branch 'dbierer-patch-2'
Browse files Browse the repository at this point in the history
  • Loading branch information
ezimuel committed Jul 17, 2017
2 parents 3c33094 + a541405 commit fcca813
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Symmetric/Openssl.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class Openssl implements SymmetricInterface
'cfb',
'ofb',
'ecb',
'ctr',
];

/**
Expand Down
10 changes: 10 additions & 0 deletions test/Symmetric/OpensslTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,14 @@ class OpensslTest extends AbstractTest
protected $default_mode = 'cbc';

protected $default_padding = 'pkcs7';

public function testCtrMode()
{
if (!in_array('aes-256-ctr', openssl_get_cipher_methods())) {
$this->markTestSkipped('The CTR mode is not supported');
}
$this->crypt->setAlgorithm('aes');
$this->crypt->setMode('ctr');
$this->assertEquals('ctr', $this->crypt->getMode());
}
}

0 comments on commit fcca813

Please sign in to comment.