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

33 lines
477 B
PHP
Raw Normal View History

<?php
2016-11-08 09:29:34 +00:00
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 [];
}
}