{"id":13438868,"url":"https://github.com/klutzy/suruga","last_synced_at":"2025-03-20T06:31:44.772Z","repository":{"id":145803384,"uuid":"20856644","full_name":"klutzy/suruga","owner":"klutzy","description":"[INACTIVE] TLS 1.2 implementation in Rust","archived":false,"fork":false,"pushed_at":"2016-01-19T01:29:04.000Z","size":173,"stargazers_count":125,"open_issues_count":2,"forks_count":13,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-10-28T00:24:02.782Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","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/klutzy.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":"2014-06-15T14:00:23.000Z","updated_at":"2024-09-27T14:34:58.000Z","dependencies_parsed_at":null,"dependency_job_id":"f196af43-83df-4a31-8d14-bedf4a0a7388","html_url":"https://github.com/klutzy/suruga","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klutzy%2Fsuruga","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klutzy%2Fsuruga/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klutzy%2Fsuruga/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/klutzy%2Fsuruga/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/klutzy","download_url":"https://codeload.github.com/klutzy/suruga/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244565624,"owners_count":20473309,"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":[],"created_at":"2024-07-31T03:01:09.139Z","updated_at":"2025-03-20T06:31:39.764Z","avatar_url":"https://github.com/klutzy.png","language":"Rust","readme":"suruga is Rust implementation of [TLS 1.2][tls-12].\n\nIt currently implements some core parts of TLS 1.2,\nNIST P-256 [ECDHE][tls-ecc] and [chacha20-poly1305][tls-chacha20-poly1305].\n\n# Usage\n\n```Rust\nextern crate suruga;\n\nuse std::io::prelude::*;\nuse std::net::TcpStream;\n\nfn main() {\n    test().unwrap();\n}\n\nfn test() -\u003e suruga::tls_result::TlsResult\u003c()\u003e {\n    let stream = try!(TcpStream::connect(\"www.google.com:443\"));\n    let mut client = try!(suruga::TlsClient::from_tcp(stream));\n    let _len = try!(client.write(b\"GET / HTTP/1.1\\r\\nHost: www.google.com\\r\\n\\r\\n\"));\n\n    let mut msg = vec![0u8; 100];\n    try!(client.read(\u0026mut msg));\n    let msg = String::from_utf8_lossy(\u0026msg);\n    println!(\"msg: {}\", msg);\n\n    try!(client.close());\n\n    Ok(())\n}\n```\n\n[tls-12]: http://tools.ietf.org/html/rfc5246\n[tls-ecc]: http://tools.ietf.org/html/rfc4492\n[tls-chacha20-poly1305]: https://tools.ietf.org/html/draft-agl-tls-chacha20poly1305-04\n","funding_links":[],"categories":["Libraries","库 Libraries","库","Frameworks and Libs","代码"],"sub_categories":["Cryptography","密码学 Cryptography","加密","Rust","密码学"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklutzy%2Fsuruga","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fklutzy%2Fsuruga","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fklutzy%2Fsuruga/lists"}