Files
provision_sccp/lib/crypto.php
2020-03-17 12:52:17 +01:00

32 lines
569 B
PHP

<?php
declare(strict_types=1);
namespace SCCP\Crypto;
class HashAlgo // extends Enum
{
private const SHA1 = 0;
private const SHA256 = 1;
}
class Certificate {
function __construct(string $file) {
$this->file = $file;
}
public function hashAsBase64(int $hashAlg) : string {
return "";
}
}
class Crypto {
public static function certificateHashAsBase64(string $certificateFile, int $hashAlg) : string {
return new Certificate($certificateFile)
.hashAsBase64($hashAlg);
}
}
class Signer {
}