diff --git a/native/native_rust_library/RustAESCrypto.cpp b/native/native_rust_library/RustAESCrypto.cpp index bb52b4dd4..a2d5dc841 100644 --- a/native/native_rust_library/RustAESCrypto.cpp +++ b/native/native_rust_library/RustAESCrypto.cpp @@ -1,18 +1,24 @@ #include "RustAESCrypto.h" #include "../cpp/CommonCpp/Tools/AESCrypto.h" namespace comm { -void aesGenerateKey(rust::Slice buffer){ +void aesGenerateKey(rust::Slice buffer) { AESCrypto::generateKey(buffer); } -void aesEncrypt(rust::Slice key, rust::Slice plaintext, rust::Slice sealedData){ +void aesEncrypt( + rust::Slice key, + rust::Slice plaintext, + rust::Slice sealedData) { AESCrypto::encrypt(key, plaintext, sealedData); } -void aesDecrypt(rust::Slice key, rust::Slice sealedData, rust::Slice plaintext){ +void aesDecrypt( + rust::Slice key, + rust::Slice sealedData, + rust::Slice plaintext) { AESCrypto::decrypt(key, sealedData, plaintext); } -} +} // namespace comm diff --git a/native/native_rust_library/RustAESCrypto.h b/native/native_rust_library/RustAESCrypto.h index a8120a65c..47f3e79bb 100644 --- a/native/native_rust_library/RustAESCrypto.h +++ b/native/native_rust_library/RustAESCrypto.h @@ -1,11 +1,17 @@ #pragma once #include "cxx.h" namespace comm { void aesGenerateKey(rust::Slice buffer); -void aesEncrypt(rust::Slice key, rust::Slice plaintext, rust::Slice sealedData); -void aesDecrypt(rust::Slice key, rust::Slice sealedData, rust::Slice plaintext); +void aesEncrypt( + rust::Slice key, + rust::Slice plaintext, + rust::Slice sealedData); +void aesDecrypt( + rust::Slice key, + rust::Slice sealedData, + rust::Slice plaintext); } // namespace comm diff --git a/scripts/get_clang_paths.js b/scripts/get_clang_paths.js index 1491d9e75..badff86da 100644 --- a/scripts/get_clang_paths.js +++ b/scripts/get_clang_paths.js @@ -1,40 +1,45 @@ // @flow const clangPaths = [ { path: 'native/cpp/CommonCpp', extensions: ['h', 'cpp'], excludes: ['_generated'], }, { path: 'native/android/app/src/cpp', extensions: ['cpp', 'h'], }, { path: 'native/ios/Comm', extensions: ['h', 'm', 'mm'], }, { path: 'native/ios/CommTests', extensions: ['mm'], }, { path: 'native/ios/NotificationService', extensions: ['h', 'm', 'mm'], }, { path: 'native/android/app/src/main/java/app/comm', extensions: ['java'], excludes: ['generated'], }, + { + path: 'native/native_rust_library', + extensions: ['cpp', 'h'], + excludes: ['target', 'lib.rs.h', 'cxx.h'], + }, { path: 'web/cpp', extensions: ['cpp', 'h'], }, ]; function getClangPaths() { return clangPaths.map(pathItem => pathItem.path); } module.exports = { getClangPaths, clangPaths };