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