{"id":17284814,"url":"https://github.com/hinsteny/commons","last_synced_at":"2025-10-06T02:48:36.916Z","repository":{"id":45505645,"uuid":"190165998","full_name":"Hinsteny/commons","owner":"Hinsteny","description":"Java12 Collect some more useful utils!","archived":false,"fork":false,"pushed_at":"2022-06-29T17:25:07.000Z","size":333,"stargazers_count":3,"open_issues_count":5,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-27T15:55:44.536Z","etag":null,"topics":["base64","dsa","ecdsa","java12","md5","rsa"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Hinsteny.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-06-04T09:00:15.000Z","updated_at":"2023-03-05T02:12:56.000Z","dependencies_parsed_at":"2022-07-19T02:04:39.376Z","dependency_job_id":null,"html_url":"https://github.com/Hinsteny/commons","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Hinsteny/commons","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hinsteny%2Fcommons","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hinsteny%2Fcommons/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hinsteny%2Fcommons/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hinsteny%2Fcommons/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Hinsteny","download_url":"https://codeload.github.com/Hinsteny/commons/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Hinsteny%2Fcommons/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278551495,"owners_count":26005386,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["base64","dsa","ecdsa","java12","md5","rsa"],"created_at":"2024-10-15T09:54:57.435Z","updated_at":"2025-10-06T02:48:36.881Z","avatar_url":"https://github.com/Hinsteny.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"## commons (Java 基础工具集合包)\n-------------------\n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/f22e5eaec8e145cca26cb3cc74503b94)](https://www.codacy.com/app/Hinsteny/commons?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=Hinsteny/commons\u0026amp;utm_campaign=Badge_Grade)\n[![Travis Build Status](https://img.shields.io/travis/Hinsteny/commons.svg)](https://travis-ci.org/Hinsteny/commons)\n[![Codecov](https://codecov.io/gh/Hinsteny/commons/branch/master/graph/badge.svg)](https://codecov.io/gh/Hinsteny/commons)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.hinsteny/commons-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.hinsteny/commons-core)\n\n## Java环境\nopen-jdk12\n\n## 模块划分\n\n*  commons-parent: 父模块, 进行项目说明及相关依赖声明\n*  commons-core: 核心模块, 定义最基础的Java相关操作工具集合\n*  commons-warp: 对一些常用的Java生态中的工具进行封装集成, 比如okhhtp, httpclient, javax.mail, poi等\n\n## 开发与发布\n\n1.  发布到sonatype, 供大家引入使用\n\n```\n  mvn clean deploy -Dmaven.skip.test=true -X\n```\n\n2.  项目中配置使用jacoco做代码覆盖率检测, 执行命令为\n\n```\n  mvn clean test\n```\n\n## 功能描述\n\n*  常用签名及加解密工具类: Base64, MD5, DES, 3DES, DSA, ECDSA, RSA, SHARS;\n*  常见算法工具类实现: 二叉堆(堆排序)\n\n## 引入使用\n\n1.  在项目pom.xml文件中加入依赖\n\n```\n  \u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.hinsteny\u003c/groupId\u003e\n    \u003cartifactId\u003ecommons-core\u003c/artifactId\u003e\n    \u003cversion\u003e0.0.3\u003c/version\u003e\n  \u003c/dependency\u003e\n```\n\n2.  在项目的module-info.java文件中添加模块依赖\n\n```\n  requires com.github.hinsteny.commons.core;\n```\n\n3.  使用模块中的工具类\n\n```\n  String myMessage = \"Hello Hinsteny. nice to see you!\";\n  KeyPair keyPair = RSASignUtil.generateKeyPair();\n  String publicKey = RSASignUtil.getPublicKey(keyPair);\n  String privateKey = RSASignUtil.getPrivateKey(keyPair);\n  System.out.println(\"============== 默认RSA签名前后使用Base64加解码 ==============\");\n  String sign = signWithRsa(myMessage, privateKey, DEFAULT_CHARSET);\n  System.out.println(String.format(\"sign data: %s, result: %s\", myMessage, sign));\n  boolean verify = verifyWithRsa(myMessage, sign, publicKey, DEFAULT_CHARSET);\n  System.out.println(\"verify result: \" + verify);\n```\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\nCopyright (c) 2019-present, Hinsteny","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhinsteny%2Fcommons","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhinsteny%2Fcommons","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhinsteny%2Fcommons/lists"}