synapse
A component of the AienOS ecosystem.
Brought by drakestapleton
synapse / crates / synapse-auth / src / key_cache.rs
| 1 | //! Decoded-key cache for the grant, request and capability-chain checks (issue #93). |
| 2 | //! |
| 3 | //! The cache itself lives in `synapse_core::key_cache` so the changeset envelope check shares |
| 4 | //! it; see that module for the bounds and refusal rules. |
| 5 | |
| 6 | pub(crate) use synapse_core::cached_verifying_key as verifying_key; |
| 7 | pub use synapse_core::KEY_CACHE_CAPACITY; |
| 8 | |
| 9 | /// `(cached keys, point decodes)` for this thread. |
| 10 | #[cfg(test)] |
| 11 | pub(crate) fn stats() -> (usize, u64) { |
| 12 | synapse_core::key_cache_stats() |
| 13 | } |
| 14 | |
| 15 | #[cfg(test)] |
| 16 | mod tests; |