MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / decrypt_payload

Function decrypt_payload

nodedb-spatial/src/persist.rs:58–64  ·  view source on GitHub ↗
(
    key: &nodedb_wal::crypto::WalEncryptionKey,
    blob: &[u8],
)

Source from the content-addressed store, hash-verified

56}
57
58fn decrypt_payload(
59 key: &nodedb_wal::crypto::WalEncryptionKey,
60 blob: &[u8],
61) -> Result<Vec<u8>, RTreeCheckpointError> {
62 nodedb_wal::crypto::decrypt_segment_envelope(key, &SEGV_MAGIC, blob)
63 .map_err(|e| RTreeCheckpointError::DecryptionFailed(e.to_string()))
64}
65
66/// Encrypt a geohash msgpack payload (called from `geohash_index.rs`).
67pub(crate) fn encrypt_geohash_payload(

Callers 2

decrypt_geohash_payloadFunction · 0.85
from_checkpointMethod · 0.85

Calls 2

decrypt_segment_envelopeFunction · 0.85
to_stringMethod · 0.80

Tested by

no test coverage detected