{"id":21097928,"url":"https://github.com/layer26/SecureStream","last_synced_at":"2025-10-01T17:30:52.779Z","repository":{"id":117422108,"uuid":"159747044","full_name":"10sa/SecureStream","owner":"10sa","description":"Provide CTR based simple AES encryption/decryption stream.","archived":false,"fork":false,"pushed_at":"2019-05-11T01:29:07.000Z","size":42,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-19T22:55:16.471Z","etag":null,"topics":["aes-256","aes-ctr","csharp","stream"],"latest_commit_sha":null,"homepage":"","language":"C#","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/10sa.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}},"created_at":"2018-11-30T00:46:52.000Z","updated_at":"2019-05-23T13:17:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"c5a8e9c4-425b-443e-8238-c6c0881e3ac8","html_url":"https://github.com/10sa/SecureStream","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10sa%2FSecureStream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10sa%2FSecureStream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10sa%2FSecureStream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/10sa%2FSecureStream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/10sa","download_url":"https://codeload.github.com/10sa/SecureStream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":234883310,"owners_count":18901366,"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":["aes-256","aes-ctr","csharp","stream"],"created_at":"2024-11-19T22:52:07.294Z","updated_at":"2025-10-01T17:30:52.458Z","avatar_url":"https://github.com/10sa.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SecureStream\nProvide CTR based simple AES encryption/decryption stream.\n\n# Using\n\n## Basic methods\n```csharp\n  // This method same as MemoryStream class methods. //\n  CryptoMemoryStream.Write\n  CryptoMemoryStream.Read\n  \n  // Encrypts and writes bytes to the stream. //\n  CryptoMemoryStream.Encrypt\n  \n  // Decrypts and reading bytes from stream. //\n  CryptoMemoryStream.Decrypt\n```\n## Notes ##\nThese methods do not reuse the nonce used in the CTR algorithm. That is, the result of encrypting all the bytes at once by the Write method differs from the result of encrypting the bytes by dividing them many times.\n\n## Encryption\n```csharp\n  byte[] datas = new byte[] {0x00, 0x00, 0x00, 0x00};\n  byte[] buffer = new byte[datas.Length];\n  \n  // Encrypt bytes //\n  CryptoMemoryStream.Encrypt(datas, 0, datas.Length);\n  \n  // Reading encrypted bytes //\n  // The CTR-based AES encryption algorithm has the same length as the original data length and the encrypted data. //\n  // 0x00, 0x00, 0x00, 0x00 =\u003e 0x??, 0x??, 0x??, 0x??\n  CryptoMemoryStream.Read(buffer, 0, buffer.Length);\n```\n\n## Decryption\n```csharp\n  byte[] encryptedDatas = new byte[] {0x??, 0x??, 0x??, 0x??};\n  byte[] buffer = new byte[encryptedDatas.Length];\n  \n  // Decrypt bytes //\n  CryptoMemoryStream.Write(encryptedDatas, 0, encryptedDatas.Length);\n  \n  // Reading dencrypted bytes //\n  CryptoMemoryStream.Decrypt(buffer, 0, buffer.Length);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flayer26%2FSecureStream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flayer26%2FSecureStream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flayer26%2FSecureStream/lists"}