mirror of
https://github.com/nicoburns/blessed-rs
synced 2024-11-10 06:14:15 +00:00
Add cryptography section (fixes #11)
This commit is contained in:
parent
2614d02f43
commit
e5251e99d6
4 changed files with 142 additions and 53 deletions
|
@ -224,6 +224,94 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"slug": "cryptography",
|
||||
"name": "Cryptography",
|
||||
"description": "Crates that provide implementations of cryptographic algorithms. This section attempts to list the best crates for the listed algorithms, but does not intend to make recommendations for the algorithms themselves.<br />",
|
||||
"subgroups": [],
|
||||
"purposes": [
|
||||
{
|
||||
"name": "Password Hashing",
|
||||
"notes": "For more algorithms, see <a href=\"https://github.com/RustCrypto/password-hashes#rustcrypto-password-hashes\">Rust Crypto Password Hashes</a>.",
|
||||
"crates": [
|
||||
{ "name": "argon2", "notes": "" },
|
||||
{ "name": "scrypt", "notes": "" },
|
||||
{ "name": "bcrypt", "notes": "" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "General Purpose Hashing",
|
||||
"notes": "For more algorithms, see <a href=\"https://github.com/RustCrypto/hashes#rustcrypto-hashes\">Rust Crypto Hashes</a>.",
|
||||
"crates": [
|
||||
{ "name": "sha2", "notes": "" },
|
||||
{ "name": "sha1", "notes": "" },
|
||||
{ "name": "md-5", "notes": "" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "AEAD Encryption",
|
||||
"notes": "For more algorithms, see <a href=\"https://github.com/RustCrypto/AEADs#rustcrypto-authenticated-encryption-with-associated-data-aead-algorithms\">Rust Crypto AEADs</a>.",
|
||||
"crates": [
|
||||
{ "name": "aes-gcm-siv", "notes": "" },
|
||||
{ "name": "aes-gcm", "notes": "" },
|
||||
{ "name": "chacha20poly1305", "notes": "" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "RSA",
|
||||
"crates": [
|
||||
{ "name": "rsa", "notes": "" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Digital Signatures",
|
||||
"notes": "For more algorithms, see <a href=\"https://github.com/RustCrypto/signatures#rustcrypto-signatures--\">Rust Crypto Signatures</a>.",
|
||||
"crates": [
|
||||
{ "name": "ed25519", "notes": "Use in conjunction with the ed25519-dalek crate." },
|
||||
{ "name": "ecdsa", "notes": "" },
|
||||
{ "name": "dsa", "notes": "" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Certificate Formats",
|
||||
"notes": "For more formats, see <a href=\"https://github.com/RustCrypto/formats#rustcrypto-formats--\">Rust Crypto Formats</a>.",
|
||||
"crates": [
|
||||
{ "name": "der", "notes": "" },
|
||||
{ "name": "pem‑rfc7468 ", "notes": "" },
|
||||
{ "name": "pkcs8", "notes": "" },
|
||||
{ "name": "x509-cert", "notes": "" }
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "TLS / SSL",
|
||||
"crates": [{
|
||||
"name": "rustls",
|
||||
"notes": "A portable pure-rust high-level implementation of TLS. Implements TLS 1.2 and higher."
|
||||
}, {
|
||||
"name": "rust-native-tls",
|
||||
"notes": "Delegates to the system TLS implementations on windows and macOS, and uses OpenSSL on linux."
|
||||
}, {
|
||||
"name": "webpki",
|
||||
"notes": "X.509 Certificate validation. Builds on top of ring."
|
||||
}, {
|
||||
"name": "ring",
|
||||
"notes": "Fork of BoringSSL. Provides cryptographic primitives for TLS/SSL"
|
||||
}]
|
||||
},
|
||||
{
|
||||
"name": "Utilities",
|
||||
"crates": [{
|
||||
"name": "subtle",
|
||||
"notes": "Utilities for writing constant-time algorithms"
|
||||
},
|
||||
{
|
||||
"name": "zeroize",
|
||||
"notes": "Securely erase memory"
|
||||
}]
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
{
|
||||
"slug": "networking",
|
||||
"name": "Networking",
|
||||
|
@ -272,16 +360,6 @@
|
|||
"notes": "A low-level HTTP implementation (both client and server). Implements HTTP 1, 2, and 3. Requires the tokio async runtime."
|
||||
}]
|
||||
},
|
||||
{
|
||||
"name": "TLS / SSL",
|
||||
"crates": [{
|
||||
"name": "rustls",
|
||||
"notes": "A portable pure-rust implementation of TLS"
|
||||
}, {
|
||||
"name": "rust-native-tls",
|
||||
"notes": "Delegates to the system TLS implementations on windows and macOS, and uses OpenSSL on linux."
|
||||
}]
|
||||
},
|
||||
{
|
||||
"name": "HTTP Client",
|
||||
"crates": [{
|
||||
|
|
|
@ -53,6 +53,7 @@ pub(crate) async fn run() -> impl IntoResponse {
|
|||
struct Crate {
|
||||
name: String,
|
||||
notes: String,
|
||||
link: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
|
@ -76,6 +77,7 @@ struct CrateGroup {
|
|||
name: String,
|
||||
description: String,
|
||||
subgroups: Vec<CrateSubGroup>,
|
||||
purposes: Option<Vec<Purpose>>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
|
|
41
templates/macros/crate_table.html
Normal file
41
templates/macros/crate_table.html
Normal file
|
@ -0,0 +1,41 @@
|
|||
{% macro crate_table(purposes) %}
|
||||
<table class="full-width fixed-layout">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="use-case-column">Use Case</th>
|
||||
<!-- <th width="100">Recommendation</th> -->
|
||||
<!-- <th>Latest Version</th> -->
|
||||
<!-- <th>Last Updated</th> -->
|
||||
<!-- <th>Notes</th> -->
|
||||
<th>Recommended Crates</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for purpose in purposes %}
|
||||
<tbody>
|
||||
<!--{% for crate in purpose.crates %}
|
||||
<tr>
|
||||
{% if loop.index0 == 0 %}<td rowspan="{{ purpose.crates | length }} ">{{ purpose.name }}</td>{% endif %}
|
||||
<td><a href="https://docs.rs/{{ crate.name }}">{{ crate.name }}</a></td>
|
||||
<td class="crate-notes">{{ crate.notes | safe }}</td>
|
||||
</tr>
|
||||
{% endfor %} -->
|
||||
<tr>
|
||||
<td>{{ purpose.name }}</td>
|
||||
<td>
|
||||
<!-- <ul> -->
|
||||
{% if purpose.notes %}
|
||||
<p style="margin: 3px 6px 6px 6px;font-style: italic;color: #666">{{ purpose.notes | safe }}</p>
|
||||
{% endif %}
|
||||
{% for crate in purpose.crates %}
|
||||
<p style="margin: 3px 6px;max-width: 600px">
|
||||
<b style="font-size: 14px"><a href="{% if crate.link %}{{ crate.link }}{% else %}https://docs.rs/{{ crate.name }}{% endif %}">{{ crate.name }}</a></b><br />
|
||||
{{ crate.notes | safe }}
|
||||
</p>
|
||||
{% endfor %}
|
||||
<!-- </ul> -->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endmacro crate_table %}
|
|
@ -1,5 +1,6 @@
|
|||
{% extends "base.html" %}
|
||||
{% import "macros/toc.html" as toc %}
|
||||
{% import "macros/crate_table.html" as crate_table %}
|
||||
{% block title %}Crate List{% endblock title %}
|
||||
|
||||
{% block head %}
|
||||
|
@ -37,50 +38,17 @@
|
|||
<section data-toc-section id="section-{{ group.slug }}">
|
||||
<h3>{{ group.name }}</h3>
|
||||
<p class="group-description">{{ group.description | safe }}</p>
|
||||
|
||||
{% if group.purposes %}
|
||||
{{ crate_table::crate_table(purposes=group.purposes) }}
|
||||
{% endif %}
|
||||
|
||||
{% for subgroup in group.subgroups %}
|
||||
<section data-toc-section id="section-{{ group.slug }}-subsection-{{ subgroup.slug }}">
|
||||
<h4>{{ subgroup.name }}</h4>
|
||||
<p class="group-description">{{ subgroup.description | safe }}</p>
|
||||
<table class="full-width fixed-layout">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="use-case-column">Use Case</th>
|
||||
<!-- <th width="100">Recommendation</th> -->
|
||||
<!-- <th>Latest Version</th> -->
|
||||
<!-- <th>Last Updated</th> -->
|
||||
<!-- <th>Notes</th> -->
|
||||
<th>Recommended Crates</th>
|
||||
</tr>
|
||||
</thead>
|
||||
{% for purpose in subgroup.purposes %}
|
||||
<tbody>
|
||||
<!--{% for crate in purpose.crates %}
|
||||
<tr>
|
||||
{% if loop.index0 == 0 %}<td rowspan="{{ purpose.crates | length }} ">{{ purpose.name }}</td>{% endif %}
|
||||
<td><a href="https://docs.rs/{{ crate.name }}">{{ crate.name }}</a></td>
|
||||
<td class="crate-notes">{{ crate.notes | safe }}</td>
|
||||
</tr>
|
||||
{% endfor %} -->
|
||||
<tr>
|
||||
<td>{{ purpose.name }}</td>
|
||||
<td>
|
||||
<!-- <ul> -->
|
||||
{% if purpose.notes %}
|
||||
<p style="margin: 3px 6px 6px 6px;font-style: italic;color: #666">{{ purpose.notes | safe }}</p>
|
||||
{% endif %}
|
||||
{% for crate in purpose.crates %}
|
||||
<p style="margin: 3px 6px;max-width: 600px">
|
||||
<b style="font-size: 14px"><a href="https://docs.rs/{{ crate.name }}">{{ crate.name }}</a></b><br />
|
||||
{{ crate.notes | safe }}
|
||||
</p>
|
||||
{% endfor %}
|
||||
<!-- </ul> -->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</section>
|
||||
<section data-toc-section id="section-{{ group.slug }}-subsection-{{ subgroup.slug }}">
|
||||
<h4>{{ subgroup.name }}</h4>
|
||||
<p class="group-description">{{ subgroup.description | safe }}</p>
|
||||
{{ crate_table::crate_table(purposes=subgroup.purposes) }}
|
||||
</section>
|
||||
{% endfor %}
|
||||
</section>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in a new issue