{"id":30282946,"url":"https://github.com/novacrypto/base58","last_synced_at":"2025-08-16T17:08:27.600Z","repository":{"id":25947314,"uuid":"106954906","full_name":"NovaCrypto/Base58","owner":"NovaCrypto","description":"Base58 Encode Decode","archived":false,"fork":false,"pushed_at":"2022-01-19T00:29:47.000Z","size":675,"stargazers_count":13,"open_issues_count":0,"forks_count":8,"subscribers_count":3,"default_branch":"main","last_synced_at":"2023-07-28T10:10:22.399Z","etag":null,"topics":["base58","bitcoin","litecoin"],"latest_commit_sha":null,"homepage":"https://novacrypto.github.io/Base58","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NovaCrypto.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":"2017-10-14T19:03:42.000Z","updated_at":"2022-11-23T20:18:59.000Z","dependencies_parsed_at":"2022-08-07T11:16:11.847Z","dependency_job_id":null,"html_url":"https://github.com/NovaCrypto/Base58","commit_stats":null,"previous_names":[],"tags_count":5,"template":null,"template_full_name":null,"purl":"pkg:github/NovaCrypto/Base58","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NovaCrypto%2FBase58","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NovaCrypto%2FBase58/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NovaCrypto%2FBase58/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NovaCrypto%2FBase58/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NovaCrypto","download_url":"https://codeload.github.com/NovaCrypto/Base58/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NovaCrypto%2FBase58/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270742043,"owners_count":24637504,"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-08-16T02:00:11.002Z","response_time":91,"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":["base58","bitcoin","litecoin"],"created_at":"2025-08-16T17:08:26.584Z","updated_at":"2025-08-16T17:08:27.582Z","avatar_url":"https://github.com/NovaCrypto.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Maven Central](https://img.shields.io/maven-central/v/io.github.novacrypto/Base58)](https://search.maven.org/artifact/io.github.novacrypto/Base58/)\n\n# Install\n\nUsing:\n\n```groovy\nrepositories {\n    mavenCentral()\n}\n```\n\nAdd dependency:\n\n```groovy\ndependencies {\n    implementation 'io.github.novacrypto:Base58:2022.01.17@jar'\n}\n```\n\n# Usage\n\nFrom simplest to most advanced:\n\n## Encode (static method)\n\n```java\nString base58 = Base58.base58Encode(bytes);\n```\n\n## Decode (static method)\n\n```java\nbyte[] bytes = Base58.base58Decode(base58String);\n```\n\nThe static methods are threadsafe as they have a shared buffer per thread. They are named so they are still readable if you `import static`.\n\n## Encode (instance method)\n\n```java\nString base58 = Base58.newInstance().encode(bytes);\n```\n\n## Decode (instance method)\n\n```java\nbyte[] bytes = Base58.newInstance().decode(base58CharSequence);\n```\n\nThe instances are not threadsafe, never share an instance across threads.\n\n## Encode (to a target, instance method)\n\nEither:\n\n```java\nfinal StringBuilder sb = new StringBuilder();\nBase58.newSecureInstance().encode(bytes, sb::append);\nreturn sb.toString();\n```\n\nOr let it get told the correct initial maximum size:\n\n```java\nfinal StringBuilder sb = new StringBuilder();\nBase58.newSecureInstance().encode(bytes, sb::ensureCapacity, sb::append);\nreturn sb.toString();\n```\n\nOr supply an implementation of `EncodeTargetFromCapacity`:\n\n```java\nfinal StringBuilder sb = new StringBuilder();\nBase58.newSecureInstance().encode(bytes, (charLength) -\u003e {\n    // gives you a chance to allocate memory before passing the buffer as an EncodeTarget\n    sb.ensureCapacity(charLength);\n    return sb::append; // EncodeTarget\n});\nreturn sb.toString();\n```\n\n## Decode (to a target, instance method)\n\n```java\nstatic class ByteArrayTarget implements DecodeTarget {\n    private int idx = 0;\n    byte[] bytes;\n\n    @Override\n    public DecodeWriter getWriterForLength(int len) {\n        bytes = new byte[len];\n        return b -\u003e bytes[idx++] = b;\n    }\n}\n\nByteArrayTarget target = new ByteArrayTarget();\nBase58.newSecureInstance().decode(base58, target);\ntarget.bytes;\n```\n\nThese advanced usages avoid allocating memory and allow [SecureByteBuffer](https://github.com/NovaCrypto/SecureString/blob/master/src/main/java/io/github/novacrypto/SecureByteBuffer.java) usage.\n\n# Change Log\n\n## 0.1.3\n\n- Update dependencies\n- Add `EncodeTargetFromCapacity` and `EncodeTargetCapacity` interfaces and related `SecureEncoder#encode` method overloads\n\n## 2022.01.17\n\n- uses static `SecureRandom` on the advice of Spotbugs, and while it was a false positive intended for `Random` use warning, it's not a bad thing to do anyway.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovacrypto%2Fbase58","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnovacrypto%2Fbase58","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovacrypto%2Fbase58/lists"}