{"id":18074181,"url":"https://github.com/maxlaverse/synocrypto","last_synced_at":"2025-04-12T05:51:03.123Z","repository":{"id":40463141,"uuid":"355317081","full_name":"maxlaverse/synocrypto","owner":"maxlaverse","description":"Portable encryption/decryption CLI and Go library, compatible with Synology CloudSync","archived":false,"fork":false,"pushed_at":"2022-09-17T15:12:24.000Z","size":759,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-26T01:13:09.076Z","etag":null,"topics":["cloud-sync","decryption","encryption","synology"],"latest_commit_sha":null,"homepage":"","language":"Go","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/maxlaverse.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-06T20:09:31.000Z","updated_at":"2025-01-11T18:08:54.000Z","dependencies_parsed_at":"2022-08-09T21:12:26.962Z","dependency_job_id":null,"html_url":"https://github.com/maxlaverse/synocrypto","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlaverse%2Fsynocrypto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlaverse%2Fsynocrypto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlaverse%2Fsynocrypto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlaverse%2Fsynocrypto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxlaverse","download_url":"https://codeload.github.com/maxlaverse/synocrypto/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525153,"owners_count":21118616,"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","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":["cloud-sync","decryption","encryption","synology"],"created_at":"2024-10-31T10:11:33.167Z","updated_at":"2025-04-12T05:51:03.091Z","avatar_url":"https://github.com/maxlaverse.png","language":"Go","readme":"# Synology Cloud Sync encryption/decryption in Go\n\n[![GoDoc](https://godoc.org/github.com/maxlaverse/synocrypto?status.svg)](https://godoc.org/github.com/maxlaverse/synocrypto)\n[![test](https://github.com/maxlaverse/synocrypto/actions/workflows/workflow.yaml/badge.svg)](https://github.com/maxlaverse/synocrypto/actions/workflows/workflow.yaml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/maxlaverse/synocrypto)](https://goreportcard.com/report/github.com/maxlaverse/synocrypto)\n[![GitHub tag (latest SemVer)](https://img.shields.io/github/tag/maxlaverse/synocrypto.svg?style=social)](https://github.com/maxlaverse/synocrypto/tags)\n\n## Overview\n\nA Go library to decrypt/encrypt Synology Cloud Sync files on various Operating Systems (Linux, macOS, Windows).\n\nThe file format was originally discovered by [@marnix](https://github.com/marnix)\nand is summarized [in this document](ENCRYPTION.md).\n\n## Command line tool\n\n### Installation\n\nAssuming you have the go toolchain installed:\n```\ngo install github.com/maxlaverse/synocrypto/cli/synocrypto\n```\n\nYou can also download pre-compiled binaries from the [releases] page.\n\n### Usage\n```\nNAME:\n   synocrypto - A cli for encrypting and decrypting Synology Cloud Sync files\n\nUSAGE:\n   synocrypto [global options] command [command options] [arguments...]\n\nCOMMANDS:\n   decrypt, d   Decrypts a file\n   encrypt, e   Encrypts a file\n   metadata, m  Displays the metadata of a file\n   version      Prints the version\n   help, h      Shows a list of commands or help for one command\n\nGLOBAL OPTIONS:\n   --debug     outputs additional debug lines (default: false)\n   --help, -h  show help (default: false)\n```\n\n## Library\n\n### Decryption Usage\n\n```go\nencFile, err := os.Open(\"./my-encrypted-file.jpg\")\nif err != nil {\n      panic(err)\n}\ndefer encFile.Close()\n\ndecFile, err := os.OpenFile(\"./my-decrypted-file.jpg\", os.O_CREATE|os.O_WRONLY, 0644)\nif err != nil {\n      panic(err)\n}\ndefer decFile.Close()\n\ndecrypter := synocrypto.NewDecrypter(synocrypto.DecrypterOptions{\n      Password: \"synocrypto\",\n})\n\nerr = decrypter.Decrypt(encFile, decFile)\nif err != nil {\n      panic(err)\n}\n```\n\n### Encryption Usage\n\n```go\nplainFile, err := os.Open(\"./my-plain-file.jpg\")\nif err != nil {\n      panic(err)\n}\ndefer plainFile.Close()\n\nencFile, err := os.OpenFile(\"./my-encrypted-file.jpg\", os.O_CREATE|os.O_WRONLY, 0644)\nif err != nil {\n      panic(err)\n}\ndefer encFile.Close()\n\nprivateKey, err := ioutil.ReadFile(\"private.pem\")\nif err != nil {\n      panic(err)\n}\n\nencrypter := synocrypto.NewEncrypter(synocrypto.EncrypterOptions{\n      Password: \"synocrypto\",\n      PrivateKey: privateKey,\n})\n\nerr = encrypter.Encrypt(plainFile, encFile)\nif err != nil {\n      panic(err)\n}\n```\n\n\n[releases]: https://github.com/maxlaverse/synocrypto/releases","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxlaverse%2Fsynocrypto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxlaverse%2Fsynocrypto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxlaverse%2Fsynocrypto/lists"}