{"id":37030126,"url":"https://github.com/dimchat/core-java","last_synced_at":"2026-01-14T03:39:58.849Z","repository":{"id":57715680,"uuid":"183180353","full_name":"dimchat/core-java","owner":"dimchat","description":"Decentralized Instant Messaging Protocol (Java)","archived":false,"fork":false,"pushed_at":"2025-12-16T21:21:41.000Z","size":1076,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-16T21:38:18.480Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dimchat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-04-24T08:08:50.000Z","updated_at":"2025-12-16T21:21:44.000Z","dependencies_parsed_at":"2023-02-12T10:31:19.058Z","dependency_job_id":"d5696388-04ad-4dbf-8236-cb91b9d7681c","html_url":"https://github.com/dimchat/core-java","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/dimchat/core-java","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimchat%2Fcore-java","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimchat%2Fcore-java/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimchat%2Fcore-java/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimchat%2Fcore-java/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dimchat","download_url":"https://codeload.github.com/dimchat/core-java/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dimchat%2Fcore-java/sbom","scorecard":{"id":343253,"data":{"date":"2025-08-11","repo":{"name":"github.com/dimchat/core-java","commit":"509060bed662e9bc74900aa808677154351c3fd8"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.1,"checks":[{"name":"Maintained","score":9,"reason":"11 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 9","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: DIMP/gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T06:28:24.619Z","repository_id":57715680,"created_at":"2025-08-18T06:28:24.619Z","updated_at":"2025-08-18T06:28:24.619Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28408852,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"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":[],"created_at":"2026-01-14T03:39:58.304Z","updated_at":"2026-01-14T03:39:58.838Z","avatar_url":"https://github.com/dimchat.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Decentralized Instant Messaging Protocol (Java)\n\n[![License](https://img.shields.io/github/license/dimchat/core-java)](https://github.com/dimchat/core-java/blob/master/LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/dimchat/core-java/pulls)\n[![Platform](https://img.shields.io/badge/Platform-Java%208-brightgreen.svg)](https://github.com/dimchat/core-java/wiki)\n[![Issues](https://img.shields.io/github/issues/dimchat/core-java)](https://github.com/dimchat/core-java/issues)\n[![Repo Size](https://img.shields.io/github/repo-size/dimchat/core-java)](https://github.com/dimchat/core-java/archive/refs/heads/master.zip)\n[![Tags](https://img.shields.io/github/tag/dimchat/core-java)](https://github.com/dimchat/core-java/tags)\n[![Version](https://img.shields.io/maven-central/v/chat.dim/DIMP)](https://mvnrepository.com/artifact/chat.dim/DIMP)\n\n[![Watchers](https://img.shields.io/github/watchers/dimchat/core-java)](https://github.com/dimchat/core-java/watchers)\n[![Forks](https://img.shields.io/github/forks/dimchat/core-java)](https://github.com/dimchat/core-java/forks)\n[![Stars](https://img.shields.io/github/stars/dimchat/core-java)](https://github.com/dimchat/core-java/stargazers)\n[![Followers](https://img.shields.io/github/followers/dimchat)](https://github.com/orgs/dimchat/followers)\n\n## Dependencies\n\n* Latest Versions\n\n| Name | Version | Description |\n|------|---------|-------------|\n| [Cryptography](https://github.com/dimchat/mkm-java) | [![Version](https://img.shields.io/maven-central/v/chat.dim/Crypto)](https://mvnrepository.com/artifact/chat.dim/Crypto) | Crypto Keys |\n| [Ming Ke Ming (名可名)](https://github.com/dimchat/mkm-java) | [![Version](https://img.shields.io/maven-central/v/chat.dim/MingKeMing)](https://mvnrepository.com/artifact/chat.dim/MingKeMing) | Decentralized User Identity Authentication |\n| [Dao Ke Dao (道可道)](https://github.com/dimchat/dkd-java) | [![Version](https://img.shields.io/maven-central/v/chat.dim/DaoKeDao)](https://mvnrepository.com/artifact/chat.dim/DaoKeDao) | Universal Message Module |\n\n* build.gradle\n\n```javascript\nallprojects {\n    repositories {\n        mavenLocal()\n        mavenCentral()\n        google()\n    }\n}\n\ndependencies {\n\n    // https://central.sonatype.com/artifact/chat.dim/DIMP\n    implementation group: 'chat.dim', name: 'DIMP', version: '2.0.0'\n\n}\n```\n\n* pom.xml\n\n```xml\n\u003cdependencies\u003e\n\n    \u003c!-- https://mvnrepository.com/artifact/chat.dim/DIMP --\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003echat.dim\u003c/groupId\u003e\n        \u003cartifactId\u003eDIMP\u003c/artifactId\u003e\n        \u003cversion\u003e2.0.0\u003c/version\u003e\n        \u003ctype\u003epom\u003c/type\u003e\n    \u003c/dependency\u003e\n\n\u003c/dependencies\u003e\n```\n\n## Examples\n\n### Extends Command\n\n* _Handshake Command Protocol_\n  0. (C-S) handshake start\n  1. (S-C) handshake again with new session\n  2. (C-S) handshake restart with new session\n  3. (S-C) handshake success\n\n```java\npublic enum HandshakeState {\n    START,    // C -\u003e S, without session key(or session expired)\n    AGAIN,    // S -\u003e C, with new session key\n    RESTART,  // C -\u003e S, with new session key\n    SUCCESS,  // S -\u003e C, handshake accepted\n}\n\n/**\n *  Handshake command message\n *\n *  \u003cblockquote\u003e\u003cpre\u003e\n *  data format: {\n *      type : i2s(0x88),\n *      sn   : 123,\n *\n *      command : \"handshake\",    // command name\n *      title   : \"Hello world!\", // \"DIM?\", \"DIM!\"\n *      session : \"{SESSION_KEY}\" // session key\n *  }\n *  \u003c/pre\u003e\u003c/blockquote\u003e\n */\npublic class HandshakeCommand extends BaseCommand {\n\n    public final static String HANDSHAKE = \"handshake\";\n\n    public HandshakeCommand(Map\u003cString, Object\u003e content) {\n        super(content);\n    }\n\n    public HandshakeCommand(String text, String session) {\n        super(HANDSHAKE);\n        // text message\n        assert text != null : \"new handshake command error\";\n        put(\"title\", text);\n        // session key\n        if (session != null) {\n            put(\"session\", session);\n        }\n    }\n\n    public String getTitle() {\n        return getString(\"title\", null);\n    }\n\n    public String getSessionKey() {\n        return getString(\"session\", null);\n    }\n\n    public HandshakeState getState() {\n        return checkState(getTitle(), getSessionKey());\n    }\n\n    private static HandshakeState checkState(String text, String session) {\n        assert text != null : \"handshake title should not be empty\";\n        if (text.equals(\"DIM!\")/* || text.equals(\"OK!\")*/) {\n            return HandshakeState.SUCCESS;\n        } else if (text.equals(\"DIM?\")) {\n            return HandshakeState.AGAIN;\n        } else if (session == null) {\n            return HandshakeState.START;\n        } else {\n            return HandshakeState.RESTART;\n        }\n    }\n\n    //\n    //  Factories\n    //\n\n    public static HandshakeCommand start() {\n        return new HandshakeCommand(\"Hello world!\", null);\n    }\n\n    public static HandshakeCommand restart(String sessionKey) {\n        return new HandshakeCommand(\"Hello world!\", sessionKey);\n    }\n\n    public static HandshakeCommand again(String sessionKey) {\n        return new HandshakeCommand(\"DIM?\", sessionKey);\n    }\n\n    public static HandshakeCommand success(String sessionKey) {\n        return new HandshakeCommand(\"DIM!\", sessionKey);\n    }\n}\n```\n\n### Extends Content\n\n```java\n/**\n *  Application Customized message: {\n *      'type' : i2s(0xA0),\n *      'sn'   : 123,\n *\n *      'app'   : \"{APP_ID}\",  // application (e.g.: \"chat.dim.sechat\")\n *      'extra' : info         // others\n *  }\n */\npublic class ApplicationContent extends BaseContent implements AppContent {\n\n    public ApplicationContent(Map\u003cString, Object\u003e content) {\n        super(content);\n    }\n\n    public ApplicationContent(String app) {\n        super(ContentType.APPLICATION);\n        put(\"app\", app);\n    }\n\n    @Override\n    public String getApplication() {\n        return getString(\"app\", \"\");\n    }\n\n}\n\n```\n\n### Extends ID Address\n\n* Examples in [Plugins](https://mvnrepository.com/artifact/chat.dim/Plugins)\n\n----\n\nCopyright \u0026copy; 2018-2025 Albert Moky\n[![Followers](https://img.shields.io/github/followers/moky)](https://github.com/moky?tab=followers)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimchat%2Fcore-java","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdimchat%2Fcore-java","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdimchat%2Fcore-java/lists"}