MCPcopy Create free account
hub / github.com/error311/FileRise / decodeKeyString

Method decodeKeyString

src/FileRise/Support/CryptoAtRest.php:99–105  ·  view source on GitHub ↗

* Decode a key string without persisting it. * * Accepted formats: * - 64 hex chars (32 bytes) * - base64:... (32 bytes after decode) * - raw 32-byte string (advanced) * * Returns the binary 32-byte key or null if invalid/unusable. */

(string $raw)

Source from the content-addressed store, hash-verified

97 * Returns the binary 32-byte key or null if invalid/unusable.
98 */
99 public static function decodeKeyString(string $raw): ?string
100 {
101 if (!self::isAvailable()) {
102 return null;
103 }
104 return self::parseKeyString($raw);
105 }
106
107 private static function keyFilePath(): string
108 {

Callers 2

getConfigMethod · 0.80
setEncryptionKeyMethod · 0.80

Calls 2

isAvailableMethod · 0.95
parseKeyStringMethod · 0.95

Tested by

no test coverage detected