KeyStoreclass

Allows storing files by hashed keys, rather than by actual filename. This is sometimes useful.

object→KeyStore
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public sealed class Sandbox.KeyStore

Methods6

Showing 6 methods

public static Sandbox.KeyStore CreateGlobalCache()PUBLICSTATIC

Creates a keystore which is in a global cache position. The folder can be deleted at any time, and it's all fine and no-one cares.

Returns:KeyStore—

public bool Exists(string key)PUBLIC

Check if a key exists

ParameterTypeDescription
keystring—
Returns:bool—

public byte[] Get(string key)PUBLIC

Get stored bytes, or return null

ParameterTypeDescription
keystring—
Returns:byte[]—

public void Remove(string key)PUBLIC

Remove a key

ParameterTypeDescription
keystring—
Returns:void—

public void Set(string key, byte[] data)PUBLIC

Store a bunch of bytes

ParameterTypeDescription
keystring—
databyte[]—
Returns:void—

public bool TryGet(string key, byte[] data)PUBLIC

Get stored bytes, or return false

ParameterTypeDescription
keystring—
databyte[]—
Returns:bool—

On this page