Skip to content

Commit

Permalink
feat(crypto-helper): update readme; update about page; fix clippy war…
Browse files Browse the repository at this point in the history
…nings
  • Loading branch information
TheBestTvarynka committed Apr 1, 2023
1 parent 8301c69 commit 0d5e877
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 14 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,16 @@ Visit this tool at [crypto.qkation.com](https://crypto.qkation.com).
### Features

* Written in [Rust](https://github.com/rust-lang/rust) :crab: using [yew](https://github.com/yewstack/yew) :sparkles:
* MD5
* SHA1/SHA256/SHA512
* Kerberos ciphers: AES128-CTS-HMAC-SHA1-96/AES256-CTS-HMAC-SHA1-96
* Kerberos HMAC: HMAC-SHA1-96-AES128/HMAC-SHA1-96-AES256
* RSA
* `MD5`
* `SHA1`/`SHA256`/`SHA512`
* Kerberos ciphers: `AES128-CTS-HMAC-SHA1-96`/`AES256-CTS-HMAC-SHA1-96`
* Kerberos HMAC: `HMAC-SHA1-96-AES128`/`HMAC-SHA1-96-AES256`
* `RSA`
* JWT debugger. Supported signature algorithms:
* `none`
* `HS256`
* `HS512`
* `RS256`

### Meta

Expand Down
12 changes: 9 additions & 3 deletions src/about.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,20 @@ pub fn about() -> Html {
<div class={classes!("vertical", "about-container")}>
<span>{"Crypto-helper"}</span>
<span>{"The crypto-helper is an online app that helps to work with the diferent crypto algorithms:"}</span>
<vl>
<ul>
<li>{"MD5"}</li>
<li>{"SHA1/SHA256/SHA512"}</li>
<li>{"Kerberos ciphers: AES128-CTS-HMAC-SHA1-96/AES256-CTS-HMAC-SHA1-96"}</li>
<li>{"Kerberos HMAC: HMAC-SHA1-96-AES128/HMAC-SHA1-96-AES256"}</li>
<li>{"RSA"}</li>
<li class={classes!("coming-soon")}>{"In progress: JWT/JWE debugger."}</li>
</vl>
<li>{"JWT debugger. Supported signature algorithms:"}</li>
<ul>
<li>{"none"}</li>
<li>{"HS256"}</li>
<li>{"HS512"}</li>
<li>{"RS256"}</li>
</ul>
</ul>
<span>{"All computations are performed on the client side. This tool never sends the data the any servers. Tip: if your input is not hex-encoded then you can use a "}<a href={"https://bf.qkation.com"}>{"byte-formatter"}</a>{" to transform input to the hex format."}</span>
<span>{"Authors: "}<a href={"https://github.com/TheBestTvarynka"}>{"Pavlo Myroniuk (@TheBestTvarynka)"}</a></span>
<span>{"GitHub: "}<a href={"https://github.com/TheBestTvarynka/crypto-helper"}>{"https://github.com/TheBestTvarynka/crypto-helper"}</a></span>
Expand Down
8 changes: 3 additions & 5 deletions src/common/simple_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ pub struct SimpleOutputProps {
}

fn get_set_format_callback(format: BytesFormat, set_format: UseStateSetter<BytesFormat>) -> Callback<MouseEvent> {
log::debug!("get format click");
Callback::from(move |_event| {
log::debug!("format click");
set_format.set(format.clone());
set_format.set(format);
})
}

Expand All @@ -72,7 +70,7 @@ pub fn simple_output(props: &SimpleOutputProps) -> Html {
let format_setter = bytes_format.setter();
use_effect_with_deps(
move |format| {
format_setter.set((**format).clone());
format_setter.set(**format);
},
bytes_format.clone(),
);
Expand All @@ -97,7 +95,7 @@ pub fn simple_output(props: &SimpleOutputProps) -> Html {
html! {
<button
class={get_format_button_class(*bytes_format == *format)}
onclick={get_set_format_callback(format.clone(), bytes_format.setter())}
onclick={get_set_format_callback(*format, bytes_format.setter())}
>
{<&str>::from(format)}
</button>
Expand Down
2 changes: 1 addition & 1 deletion src/header.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub fn header() -> Html {
html! {
<header>
<Link<Route> to={Route::CryptoHelper}>{"Crypto helper"}</Link<Route>>
<Link<Route> to={Route::Jwt}>{"JWT/JWE"}</Link<Route>>
<Link<Route> to={Route::Jwt}>{"JWT"}</Link<Route>>
<Link<Route> to={Route::About}>{"About"}</Link<Route>>
</header>
}
Expand Down

0 comments on commit 0d5e877

Please sign in to comment.