MCPcopy Create free account
hub / github.com/TrsstProject/trsst / decryptElementAES

Method decryptElementAES

src/main/java/com/trsst/client/Client.java:917–930  ·  view source on GitHub ↗
(byte[] data, byte[] secretKey)

Source from the content-addressed store, hash-verified

915 }
916
917 public static Element decryptElementAES(byte[] data, byte[] secretKey)
918 throws SecurityException {
919 Element result;
920
921 try {
922 byte[] after = Crypto.decryptAES(data, secretKey);
923 ByteArrayInputStream input = new ByteArrayInputStream(after);
924 result = Abdera.getInstance().getParser().parse(input).getRoot();
925 } catch (Exception e) {
926 log.error("Error while decrypting: ", e);
927 throw new SecurityException(e);
928 }
929 return result;
930 }
931
932 private final static org.slf4j.Logger log = org.slf4j.LoggerFactory
933 .getLogger(Client.class);

Callers 2

testAppMethod · 0.95
pullMethod · 0.95

Calls 2

decryptAESMethod · 0.95
getInstanceMethod · 0.80

Tested by 1

testAppMethod · 0.76