Skip to content

Commit

Permalink
Merge pull request #4 from Spomky-Labs/analysis-qx0Kk3
Browse files Browse the repository at this point in the history
Applied fixes from StyleCI
  • Loading branch information
Spomky committed Mar 3, 2016
2 parents 7ba68af + 3cf41f7 commit 98bd170
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/EncryptorInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,5 @@ public function encrypt($data);
*
* @return string
*/
public function decrypt( $data);
public function decrypt($data);
}
6 changes: 3 additions & 3 deletions src/OpenSSLEncryptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@ final class OpenSSLEncryptor implements EncryptorInterface
public function __construct($kek)
{
$this->kek = $kek;
$this->method = 'aes-'.(strlen($kek)*8).'-ecb';
$this->method = 'aes-'.(strlen($kek) * 8).'-ecb';
}

/**
* {@inheritdoc}
*/
public function encrypt($data)
{
return openssl_encrypt($data, $this->method, $this->kek, OPENSSL_ZERO_PADDING|OPENSSL_RAW_DATA);
return openssl_encrypt($data, $this->method, $this->kek, OPENSSL_ZERO_PADDING | OPENSSL_RAW_DATA);
}

/**
* {@inheritdoc}
*/
public function decrypt($data)
{
return openssl_decrypt($data, $this->method, $this->kek, OPENSSL_ZERO_PADDING|OPENSSL_RAW_DATA);
return openssl_decrypt($data, $this->method, $this->kek, OPENSSL_ZERO_PADDING | OPENSSL_RAW_DATA);
}
}

0 comments on commit 98bd170

Please sign in to comment.