!27139 fix the flatbuffer bug for flclient
Merge pull request !27139 from zhoushan33/flclient1202_master
This commit is contained in:
commit
23aee0258a
|
@ -449,8 +449,17 @@ public class CipherClient {
|
|||
String dateTime = String.valueOf(timestamp);
|
||||
int time = fbBuilder.createString(dateTime);
|
||||
|
||||
int exchangeKeysRoot = RequestExchangeKeys.createRequestExchangeKeys(fbBuilder, id, cpk, spk, iteration, time
|
||||
, indIvFbs, pwIvFbs, pwSaltFbs);
|
||||
// start build
|
||||
RequestExchangeKeys.startRequestExchangeKeys(fbBuilder);
|
||||
RequestExchangeKeys.addFlId(fbBuilder, id);
|
||||
RequestExchangeKeys.addCPk(fbBuilder, cpk);
|
||||
RequestExchangeKeys.addSPk(fbBuilder, spk);
|
||||
RequestExchangeKeys.addIteration(fbBuilder, iteration);
|
||||
RequestExchangeKeys.addTimestamp(fbBuilder, time);
|
||||
RequestExchangeKeys.addIndIv(fbBuilder, indIvFbs);
|
||||
RequestExchangeKeys.addPwIv(fbBuilder, pwIvFbs);
|
||||
RequestExchangeKeys.addPwSalt(fbBuilder, pwSaltFbs);
|
||||
int exchangeKeysRoot = RequestExchangeKeys.endRequestExchangeKeys(fbBuilder);
|
||||
fbBuilder.finish(exchangeKeysRoot);
|
||||
byte[] msg = fbBuilder.sizedByteArray();
|
||||
String url = Common.generateUrl(flParameter.isUseElb(), flParameter.getServerNum(),
|
||||
|
@ -508,7 +517,13 @@ public class CipherClient {
|
|||
long timestamp = date.getTime();
|
||||
String dateTime = String.valueOf(timestamp);
|
||||
int time = fbBuilder.createString(dateTime);
|
||||
int getExchangeKeysRoot = GetExchangeKeys.createGetExchangeKeys(fbBuilder, id, iteration, time);
|
||||
|
||||
// start build
|
||||
GetExchangeKeys.startGetExchangeKeys(fbBuilder);
|
||||
GetExchangeKeys.addFlId(fbBuilder, id);
|
||||
GetExchangeKeys.addIteration(fbBuilder, iteration);
|
||||
GetExchangeKeys.addTimestamp(fbBuilder, time);
|
||||
int getExchangeKeysRoot = GetExchangeKeys.endGetExchangeKeys(fbBuilder);
|
||||
fbBuilder.finish(getExchangeKeysRoot);
|
||||
byte[] msg = fbBuilder.sizedByteArray();
|
||||
String url = Common.generateUrl(flParameter.isUseElb(), flParameter.getServerNum(),
|
||||
|
@ -626,8 +641,14 @@ public class CipherClient {
|
|||
add[i] = clientShareRoot;
|
||||
}
|
||||
int encryptedSharesFbs = RequestShareSecrets.createEncryptedSharesVector(fbBuilder, add);
|
||||
int requestShareSecretsRoot = RequestShareSecrets.createRequestShareSecrets(fbBuilder, id,
|
||||
encryptedSharesFbs, iteration, time);
|
||||
|
||||
// start build
|
||||
RequestShareSecrets.startRequestShareSecrets(fbBuilder);
|
||||
RequestShareSecrets.addFlId(fbBuilder, id);
|
||||
RequestShareSecrets.addEncryptedShares(fbBuilder, encryptedSharesFbs);
|
||||
RequestShareSecrets.addIteration(fbBuilder, iteration);
|
||||
RequestShareSecrets.addTimestamp(fbBuilder, time);
|
||||
int requestShareSecretsRoot = RequestShareSecrets.endRequestShareSecrets(fbBuilder);
|
||||
fbBuilder.finish(requestShareSecretsRoot);
|
||||
byte[] msg = fbBuilder.sizedByteArray();
|
||||
String url = Common.generateUrl(flParameter.isUseElb(), flParameter.getServerNum(),
|
||||
|
@ -686,7 +707,12 @@ public class CipherClient {
|
|||
long timestamp = date.getTime();
|
||||
String dateTime = String.valueOf(timestamp);
|
||||
int time = fbBuilder.createString(dateTime);
|
||||
int getShareSecrets = GetShareSecrets.createGetShareSecrets(fbBuilder, id, iteration, time);
|
||||
|
||||
GetShareSecrets.startGetShareSecrets(fbBuilder);
|
||||
GetShareSecrets.addFlId(fbBuilder, id);
|
||||
GetShareSecrets.addIteration(fbBuilder, iteration);
|
||||
GetShareSecrets.addTimestamp(fbBuilder, time);
|
||||
int getShareSecrets = GetShareSecrets.endGetShareSecrets(fbBuilder);
|
||||
fbBuilder.finish(getShareSecrets);
|
||||
byte[] msg = fbBuilder.sizedByteArray();
|
||||
String url = Common.generateUrl(flParameter.isUseElb(), flParameter.getServerNum(),
|
||||
|
|
|
@ -260,7 +260,11 @@ public class GetModel {
|
|||
}
|
||||
|
||||
private byte[] build() {
|
||||
int root = RequestGetModel.createRequestGetModel(this.builder, nameOffset, iteration, timeStampOffset);
|
||||
RequestGetModel.startRequestGetModel(builder);
|
||||
RequestGetModel.addFlName(builder, nameOffset);
|
||||
RequestGetModel.addIteration(builder, iteration);
|
||||
RequestGetModel.addTimestamp(builder, timeStampOffset);
|
||||
int root = RequestGetModel.endRequestGetModel(builder);
|
||||
builder.finish(root);
|
||||
return builder.sizedByteArray();
|
||||
}
|
||||
|
|
|
@ -141,8 +141,13 @@ public class StartFLJob {
|
|||
* @return byte[] data
|
||||
*/
|
||||
public byte[] build() {
|
||||
int root = RequestFLJob.createRequestFLJob(this.builder, this.nameOffset, this.idOffset, this.iteration,
|
||||
this.dataSize, this.timestampOffset);
|
||||
RequestFLJob.startRequestFLJob(this.builder);
|
||||
RequestFLJob.addFlName(builder, nameOffset);
|
||||
RequestFLJob.addFlId(builder, idOffset);
|
||||
RequestFLJob.addIteration(builder, iteration);
|
||||
RequestFLJob.addDataSize(builder, dataSize);
|
||||
RequestFLJob.addTimestamp(builder, timestampOffset);
|
||||
int root = RequestFLJob.endRequestFLJob(builder);
|
||||
builder.finish(root);
|
||||
return builder.sizedByteArray();
|
||||
}
|
||||
|
|
|
@ -91,7 +91,12 @@ public class ClientListReq {
|
|||
long timestamp = date.getTime();
|
||||
String dateTime = String.valueOf(timestamp);
|
||||
int time = builder.createString(dateTime);
|
||||
int clientListRoot = GetClientList.createGetClientList(builder, id, iteration, time);
|
||||
|
||||
GetClientList.startGetClientList(builder);
|
||||
GetClientList.addFlId(builder, id);
|
||||
GetClientList.addIteration(builder, iteration);
|
||||
GetClientList.addTimestamp(builder, time);
|
||||
int clientListRoot = GetClientList.endGetClientList(builder);
|
||||
builder.finish(clientListRoot);
|
||||
byte[] msg = builder.sizedByteArray();
|
||||
String url = Common.generateUrl(flParameter.isUseElb(), flParameter.getServerNum(), flParameter.getDomainName());
|
||||
|
|
|
@ -106,8 +106,12 @@ public class ReconstructSecretReq {
|
|||
}
|
||||
int reconstructShareSecrets = SendReconstructSecret.createReconstructSecretSharesVector(builder,
|
||||
decryptShareList);
|
||||
int reconstructSecretRoot = SendReconstructSecret.createSendReconstructSecret(builder, desFlId,
|
||||
reconstructShareSecrets, iteration, time);
|
||||
SendReconstructSecret.startSendReconstructSecret(builder);
|
||||
SendReconstructSecret.addFlId(builder, desFlId);
|
||||
SendReconstructSecret.addReconstructSecretShares(builder, reconstructShareSecrets);
|
||||
SendReconstructSecret.addIteration(builder, iteration);
|
||||
SendReconstructSecret.addTimestamp(builder, time);
|
||||
int reconstructSecretRoot = SendReconstructSecret.endSendReconstructSecret(builder);
|
||||
builder.finish(reconstructSecretRoot);
|
||||
byte[] msg = builder.sizedByteArray();
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue