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

Function array_segment_encrypted_at_rest

nodedb-array/src/segment/reader.rs:722–731  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

720
721 #[test]
722 fn array_segment_encrypted_at_rest() {
723 let s = schema();
724 let encrypted = write_encrypted(&s, TileId::snapshot(1));
725 // Encrypted blob must start with SEGA.
726 assert_eq!(&encrypted[..4], b"SEGA");
727 let kek = test_kek();
728 let owned = OwnedSegmentReader::open_with_kek(&encrypted, Some(&kek)).unwrap();
729 let reader = owned.reader();
730 assert_eq!(reader.tile_count(), 1);
731 }
732
733 #[test]
734 fn array_segment_handle_decrypts_into_owned_buffer() {

Callers

nothing calls this directly

Calls 5

write_encryptedFunction · 0.85
snapshotFunction · 0.85
schemaFunction · 0.70
test_kekFunction · 0.70
readerMethod · 0.45

Tested by

no test coverage detected