MCPcopy Create free account
hub / github.com/signalapp/libsignal / call

Method call

java/backup-tool/src/main/java/BackupTool.java:33–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

31 }
32
33 @Override
34 public Integer call() throws Exception {
35 SignalProtocolLoggerProvider.initializeLogging(SignalProtocolLogger.INFO);
36 SignalProtocolLoggerProvider.setProvider(
37 new SignalProtocolLogger() {
38 public void log(int priority, String tag, String message) {
39 System.err.println(priority + " " + message);
40 }
41 });
42
43 byte[] hmacKey = Hex.fromStringCondensed(this.hmacKey);
44 byte[] aesKey = Hex.fromStringCondensed(this.aesKey);
45 var backupKey = MessageBackupKey.fromParts(hmacKey, aesKey);
46
47 MessageBackup.ValidationResult result =
48 MessageBackup.validate(
49 backupKey,
50 MessageBackup.Purpose.REMOTE_BACKUP,
51 () -> {
52 try {
53 return new FileInputStream(input);
54 } catch (FileNotFoundException e) {
55 throw new AssertionError(e);
56 }
57 },
58 input.length());
59 return result.unknownFieldMessages.length == 0 ? 0 : 1;
60 }
61}

Calls 5

initializeLoggingMethod · 0.95
setProviderMethod · 0.95
fromStringCondensedMethod · 0.95
fromPartsMethod · 0.95
validateMethod · 0.95

Tested by

no test coverage detected