MCPcopy Create free account
hub / github.com/ciphermodelabs/ciphercore / share_column

Function share_column

ciphercore-base/src/mpc/mpc_psi.rs:475–488  ·  view source on GitHub ↗

Share a column if it is public

(column: Node, prf_keys: Node)

Source from the content-addressed store, hash-verified

473
474// Share a column if it is public
475fn share_column(column: Node, prf_keys: Node) -> Result<Node> {
476 if is_shared(&column)? {
477 Ok(column)
478 } else {
479 let g = column.get_graph();
480 let column_shares = get_node_shares(
481 g.clone(),
482 prf_keys,
483 column.get_type()?,
484 Some((column, IOStatus::Public)),
485 )?;
486 g.create_tuple(column_shares)
487 }
488}
489
490enum Columns {
491 Public(Vec<(String, Node)>),

Callers 1

instantiateMethod · 0.85

Calls 6

is_sharedFunction · 0.85
get_node_sharesFunction · 0.85
cloneMethod · 0.80
get_graphMethod · 0.45
get_typeMethod · 0.45
create_tupleMethod · 0.45

Tested by

no test coverage detected