- Add the Codota plugin to your IDE and get smart completions
private void myMethod () {LocalDateTime l =
new LocalDateTime()
LocalDateTime.now()
DateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
- Smart code suggestions by Codota
}
/** * @param * @author Junwei Wang(wakemecn@gmail.com) */ public void setup(String pubfile, String mskfile) throws IOException, ClassNotFoundException { byte[] pub_byte, msk_byte; BswabePub pub = new BswabePub(); BswabeMsk msk = new BswabeMsk(); Bswabe.setup(pub, msk); /* store BswabePub into mskfile */ pub_byte = SerializeUtils.serializeBswabePub(pub); Common.spitFile(pubfile, pub_byte); /* store BswabeMsk into mskfile */ msk_byte = SerializeUtils.serializeBswabeMsk(msk); Common.spitFile(mskfile, msk_byte); }
public static BswabePub unserializeBswabePub(byte[] b) { BswabePub pub; int offset; pub = new BswabePub(); offset = 0; StringBuffer sb = new StringBuffer(""); offset = unserializeString(b, offset, sb); pub.pairingDesc = sb.substring(0); CurveParameters params = new DefaultCurveParameters() .load(new ByteArrayInputStream(pub.pairingDesc.getBytes())); pub.p = PairingFactory.getPairing(params); Pairing pairing = pub.p; pub.g = pairing.getG1().newElement(); pub.h = pairing.getG1().newElement(); pub.gp = pairing.getG2().newElement(); pub.g_hat_alpha = pairing.getGT().newElement(); offset = unserializeElement(b, offset, pub.g); offset = unserializeElement(b, offset, pub.h); offset = unserializeElement(b, offset, pub.gp); offset = unserializeElement(b, offset, pub.g_hat_alpha); return pub; }
public static void main(String[] args) throws Exception { BswabePub pub = new BswabePub(); BswabeMsk msk = new BswabeMsk(); BswabePrv prv, prv_delegate_ok, prv_delegate_ko;