Adopted composer autoload way
Split up classes into separate way, to allow autoloader to do it's work Signed-off-by: Diederik de Groot <ddegroot@talon.nl>
This commit is contained in:
15
lib/Crypto/Certificate.php
Normal file
15
lib/Crypto/Certificate.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PROVISION\Crypto;
|
||||
|
||||
class Certificate {
|
||||
function __construct(string $file) {
|
||||
$this->file = $file;
|
||||
}
|
||||
|
||||
public function hashAsBase64(int $hashAlg) : string {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
?>
|
12
lib/Crypto/Crypto.php
Normal file
12
lib/Crypto/Crypto.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PROVISION\Crypto;
|
||||
|
||||
class Crypto {
|
||||
|
||||
public static function certificateHashAsBase64(string $certificateFile, int $hashAlg) : string {
|
||||
return new Certificate($certificateFile)
|
||||
.hashAsBase64($hashAlg);
|
||||
}
|
||||
}
|
11
lib/Crypto/HashAlgo.php
Normal file
11
lib/Crypto/HashAlgo.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PROVISION\Crypto;
|
||||
|
||||
class HashAlgo // extends Enum
|
||||
{
|
||||
private const SHA1 = 0;
|
||||
private const SHA256 = 1;
|
||||
}
|
||||
?>
|
8
lib/Crypto/Signer.php
Normal file
8
lib/Crypto/Signer.php
Normal file
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PROVISION\Signer;
|
||||
|
||||
class Signer {
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user