MCPcopy Create free account
hub / github.com/CDSecLab/MJXT / Store

Method Store

src/main/java/client/Setup_JXTpp.java:214–237  ·  view source on GitHub ↗
(String text)

Source from the content-addressed store, hash-verified

212 }
213
214 public void Store(String text){
215 try {
216 FileOutputStream file = new FileOutputStream("data/EDB/JXT++_" + text + ".dat");
217 for (BigInteger token : tset.keySet()) {
218 file.write(token.toByteArray());
219 ArrayList<byte[]> tuples = tset.get(token);
220 for (byte[] t_each : tuples){
221 file.write(t_each);
222 }
223
224 }
225 byte[][] xset = f.getData();
226 for (int j = 0; j < xset.length; j++) {
227 file.write(xset[j]);
228 }
229 byte[][] cset = xor.getCiphertext();
230 for (int j = 0; j < cset.length; j++) {
231 file.write(cset[j]);
232 }
233 file.close();
234 } catch (IOException e) {
235 System.out.println("Error - " + e.toString());
236 }
237 }
238}

Callers

nothing calls this directly

Calls 2

getDataMethod · 0.80
getCiphertextMethod · 0.80

Tested by

no test coverage detected