┌────────────────────────────────┐ │ ░░░ ░░▓ ░▓▓ ███ ▓▓░ ▓░░ │ │ ~ M O O N ~ │ └────────────────────────────────┘
webm008.cluster103.gra.hosting.ovh.net
LOCATION:
/home/paxmediccp/www/ecrire/src/Chiffrer
☗ ROOT
↻ REFRESH
✎ EDIT FILE
EDITING: Cles.php
<?php /***************************************************************************\ * SPIP, Système de publication pour l'internet * * * * Copyright © avec tendresse depuis 2001 * * Arnaud Martin, Antoine Pitrou, Philippe Rivière, Emmanuel Saint-James * * * * Ce programme est un logiciel libre distribué sous licence GNU/GPL. * \***************************************************************************/ namespace Spip\Chiffrer; /** Conteneur de clés (chiffrement, authentification) */ class Cles implements \Countable /* , ContainerInterface */ { private array $keys; public function __construct(array $keys) { $this->keys = $keys; } public function has(string $name): bool { return array_key_exists($name, $this->keys); } public function get(string $name): ?string { return $this->keys[$name] ?? null; } public function generate(string $name): string { $key = Chiffrement::keygen(); $this->keys[$name] = $key; spip_log("Création de la cle $name", 'chiffrer' . _LOG_INFO_IMPORTANTE); return $key; } public function set( string $name, #[\SensitiveParameter] string $key ): void { $this->keys[$name] = $key; } public function delete(string $name): bool { if (isset($this->keys[$name])) { unset($this->keys[$name]); return true; }; return false; } public function count(): int { return count($this->keys); } public function toJson(): string { $json = array_map('base64_encode', $this->keys); return \json_encode($json); } }
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 Chiffrement.php
PHP
3.3 KB
2026-04-27 15:58
EDIT
📄 Cles.php
PHP
1.7 KB
2026-04-27 15:58
EDIT
📄 Password.php
PHP
2.1 KB
2026-04-27 15:58
EDIT
📄 SpipCles.php
PHP
5.5 KB
2026-04-27 15:58
EDIT