{"id":19302471,"url":"https://github.com/bitlytwiser/tinycrypt","last_synced_at":"2025-10-14T10:40:45.367Z","repository":{"id":59047700,"uuid":"535063663","full_name":"BitlyTwiser/tinycrypt","owner":"BitlyTwiser","description":"Tiny library for encrypting files and byte streams","archived":false,"fork":false,"pushed_at":"2022-12-25T17:33:07.000Z","size":1141,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-24T01:51:05.646Z","etag":null,"topics":["encryption","encryption-decryption","files","go","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","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/BitlyTwiser.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}},"created_at":"2022-09-10T17:03:29.000Z","updated_at":"2022-09-28T00:05:09.000Z","dependencies_parsed_at":"2023-01-30T22:30:36.600Z","dependency_job_id":null,"html_url":"https://github.com/BitlyTwiser/tinycrypt","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/BitlyTwiser/tinycrypt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitlyTwiser%2Ftinycrypt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitlyTwiser%2Ftinycrypt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitlyTwiser%2Ftinycrypt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitlyTwiser%2Ftinycrypt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BitlyTwiser","download_url":"https://codeload.github.com/BitlyTwiser/tinycrypt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BitlyTwiser%2Ftinycrypt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018785,"owners_count":26086452,"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-14T02:00:06.444Z","response_time":60,"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":["encryption","encryption-decryption","files","go","golang"],"created_at":"2024-11-09T23:22:18.766Z","updated_at":"2025-10-14T10:40:45.349Z","avatar_url":"https://github.com/BitlyTwiser.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tinycrypt\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/BitlyTwiser/tinycrypt)](https://goreportcard.com/report/github.com/BitlyTwiser/tinycrypt)\n\nTiny library for encrypting files and byte streams.\n\n# Installation:\n```go get github.com/BitlyTwiser/tinychunk```\n\n# Testing:\n- Initially run ```go mod tidy``` to install necessary packages.\n- One can test the module via utilizing the go test framework.\n```go test tinycrypt_test.go -v```\n\n# Usage:\n- Example usage can be seen within the test file.\n\n```\npackage tinycrypt_test\n\nimport (\n\t. \"github.com/BitlyTwiser/tinycrypt\"\n\t\"testing\"\n\n\t\"github.com/stretchr/testify/assert\"\n)\n\nfunc TestOpenFile(t *testing.T) {\n\tt.Skip(\"Do not run else it will erase the file for testing due to the append nature of opening the file. This is present for either a generic test run or viewing functionality\")\n\tbadVal, fileData, _ := OpenFile(\"../IDoNotExist.txt\")\n\n\t//We expect nil here as the file does not exist.\n\tassert.Nil(t, badVal)\n\tassert.Nil(t, fileData)\n\n\texistingVal, fileData, _ := OpenFile(\"./testing/testing_files/items.txt\")\n\n\tif assert.NotNil(t, *existingVal) \u0026\u0026 assert.NotNil(t, *fileData) {\n\t\tt.Log(\"File exists properly\")\n\t}\n}\n\nfunc TestFileEncrypt(t *testing.T) {\n\tenc := Encryption{FilePath: \"./testing/testing_files/test.txt\", SecureString: \"Password123adar$\"}\n\n\terr := enc.Encrypt()\n\n\tassert.Nil(t, err)\n}\n\nfunc TestFileDecrypt(t *testing.T) {\n\tenc := Encryption{FilePath: \"./testing/testing_files/test.txt\", SecureString: \"Password123adar$\"}\n\n\terr := enc.Decrypt()\n\t//Ensure that decryption does not fail.\n\tassert.Nil(t, err)\n}\n\nfunc TestPdfEncrypt(t *testing.T) {\n\tenc := Encryption{FilePath: \"./testing/testing_files/test.pdf\", SecureString: \"Password123adar$\"}\n\n\terr := enc.Encrypt()\n\n\tassert.Nil(t, err)\n}\n\nfunc TestPdfDecrypt(t *testing.T) {\n\tenc := Encryption{FilePath: \"./testing/testing_files/test.pdf\", SecureString: \"Password123adar$\"}\n\n\terr := enc.Decrypt()\n\t//Ensure that decryption does not fail.\n\tassert.Nil(t, err)\n}\n\nfunc TestBadFileType(t *testing.T) {\n\tenc := Encryption{FilePath: \"./testing/testing_files/test\", SecureString: \"Password123adar$\"}\n\n\terr := enc.Encrypt()\n\n\tassert.NotNil(t, err)\n}\n\nfunc TestEncryptAndDecryptOfFileStream(t *testing.T) {\n\ttestingPass := \"Password123adar$\"\n\tt.Log(\"Testing Encryption of stream\")\n\twords := []byte(\"Blue Red Green\")\n\n\tstream, err := EncryptByteStream(testingPass, words)\n\n\tassert.NotNil(t, stream)\n\tassert.Nil(t, err)\n\n\tt.Logf(\"Encrypted Stream: %v\", stream)\n\n\tt.Log(\"Testing Decryption of stream\")\n\n\tdecryptedStream, err := DecryptByteStream(testingPass, *stream)\n\n\tassert.Nil(t, err)\n\tassert.NotNil(t, decryptedStream)\n\n\tt.Logf(\"Decrypted String: %v\", string(*decryptedStream))\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitlytwiser%2Ftinycrypt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitlytwiser%2Ftinycrypt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitlytwiser%2Ftinycrypt/lists"}