prod-releaser.php/build/api/module/authentification.php

33 lines
477 B
PHP

<?php
namespace api\module;
use \error\core\Error;
class authentification{
/* RENEW CYCLING HASH
*
* @hash<String> New hash
*
*/
public static function renew($args){
extract($args);
/* (1) Fetch cyclic-hashing-system -> check file */
$fn = __BUILD__.'/api/chs/hash';
if( !is_file($fn) )
return ['ModuleError'=>Error::UnreachableResource];
/* (2) Stores new hash */
file_put_contents($fn, $hash);
return [];
}
}