摘要: 使用java进行 RSA/ECB/PKCS1PADDING 是非常方便的,例如下面的示例 public static String publicDecrypt(PublicKey publicKey,String encrypted) throws Exception{ Cipher cipher 阅读全文
posted @ 2024-03-19 22:25 SupperMary 阅读(340) 评论(0) 推荐(1) 编辑
摘要: 这里记录一下 spdlog log 的 pattern 具体参数,官方链接见 https://github.com/gabime/spdlog/wiki/3.-Custom-formatting#pattern-flags 简单版见下表 flag meaning example %v The act 阅读全文
posted @ 2023-12-02 18:52 SupperMary 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 首先是从 https://github.com/benhoyt/inih 取用的 ini 读取类头文件 //file ini.h /* inih -- simple .INI file parser SPDX-License-Identifier: BSD-3-Clause Copyright (C 阅读全文
posted @ 2023-11-26 16:52 SupperMary 阅读(11) 评论(0) 推荐(0) 编辑
摘要: AOSP 使用 repo 来组织代码的,有时候我们只需要下载其中一部分代码。下面是具体的操作方式 <?xml version="1.0" encoding="UTF-8"?> <manifest> <remote name="aosp" fetch=".." review="https://andr 阅读全文
posted @ 2023-10-28 08:09 SupperMary 阅读(74) 评论(0) 推荐(0) 编辑
摘要: 编码过程中我们有时候需要将数据的十六进制值打出来看看,这里做一下记录 #include <ctype.h> #include <unistd.h> #include <sstream> #include <string> #include <iomanip> std::string pretty_s 阅读全文
posted @ 2023-10-03 11:52 SupperMary 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 跟着官网的Demo试验了一下,发现跑起来就Abort了,下面是具体的报错 terminate called after throwing an instance of 'std::system_error' what(): Unknown error -1 Aborted (core dumped) 阅读全文
posted @ 2023-10-03 09:11 SupperMary 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 某日上班,登服务器后编译Android ROM,增量编译时间比平时长了 3~4 倍,htop 看一下 ![](https://img2023.cnblogs.com/blog/818645/202307/818645-20230730134154777-1721635038.png) 好奇怪,怎么前 阅读全文
posted @ 2023-07-30 14:44 SupperMary 阅读(561) 评论(0) 推荐(0) 编辑
摘要: perfetto 是从安卓9.0开始可用的安卓系统性能监测相关的一个工具,可以参考官网: [perfetto](https://developer.android.google.cn/studio/command-line/perfetto?hl=zh_cn) 通常我们使用 ui.perfetto. 阅读全文
posted @ 2023-07-23 18:43 SupperMary 阅读(933) 评论(0) 推荐(0) 编辑
摘要: 记录一下,方便取用 #include <thread> #ifdef _WIN32 #include <Windows.h> const char* timenow() { static thread_local char str[32]; SYSTEMTIME st; GetLocalTime(& 阅读全文
posted @ 2022-10-19 00:22 SupperMary 阅读(353) 评论(0) 推荐(0) 编辑
摘要: linux 里面写一些命令行小玩意儿有 getopt 这个函数方便使用,Windows 上是不自带的,从 libevent 的仓库里扣了出来 // getopt.h #ifndef __GETOPT_H__ #define __GETOPT_H__ #ifdef __cplusplus extern 阅读全文
posted @ 2022-10-18 23:27 SupperMary 阅读(289) 评论(0) 推荐(0) 编辑