MCPcopy Create free account
hub / github.com/Recordscript/recordscript / enc

Method enc

libs/hbb_common/src/tcp.rs:314–318  ·  view source on GitHub ↗
(&mut self, data: &[u8])

Source from the content-addressed store, hash-verified

312 }
313
314 pub fn enc(&mut self, data: &[u8]) -> Vec<u8> {
315 self.1 += 1;
316 let nonce = FramedStream::get_nonce(self.1);
317 secretbox::seal(&data, &nonce, &self.0)
318 }
319
320 pub fn decode(
321 symmetric_data: &[u8],

Callers 1

send_rawMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected