Skip to content

Commit

Permalink
fix: Show all the algorithm names (#154)
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Nov 19, 2023
1 parent 5fa1ff2 commit 2618d75
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/gpg/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,13 @@ impl GpgKey {
" "
},
if let Ok(algorithm_name) = subkey.algorithm_name() {
if algorithm_name.len() == 7 {
algorithm_name
} else {
if algorithm_name.is_empty() {
String::from("unrecog")
} else {
format!("{:-<7}", algorithm_name)
.chars()
.take(7)
.collect()
}
} else {
String::from("unknown")
Expand Down

0 comments on commit 2618d75

Please sign in to comment.