sensorconfig encryption
This commit is contained in:
parent
d9576bf275
commit
ffcc2407cb
|
@ -73,12 +73,13 @@ public class CentralSensorConfigService {
|
|||
try {
|
||||
String sensorConfigJsonStr = this.objectMapper.writeValueAsString(sensorConfig);
|
||||
// gzip
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||
ByteArrayOutputStream bos = new ByteArrayOutputStream(sensorConfigJsonStr.length());
|
||||
GZIPOutputStream gzip = new GZIPOutputStream(bos);
|
||||
gzip.write(sensorConfigJsonStr.getBytes("UTF-8"));
|
||||
gzip.flush();
|
||||
gzip.close();
|
||||
byte[] compressedByte = bos.toByteArray();
|
||||
bos.close();
|
||||
|
||||
// DES encryption
|
||||
Cipher cipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
|
||||
|
|
Loading…
Reference in New Issue
Block a user