update
This commit is contained in:
parent
ef1da94872
commit
abceac2073
5 changed files with 8 additions and 9 deletions
|
@ -3,9 +3,7 @@ mod msg;
|
|||
mod notification;
|
||||
mod pages;
|
||||
|
||||
use tokio::sync::Mutex;
|
||||
|
||||
use actix_web::{web, App, HttpServer};
|
||||
use actix_web::{web, App};
|
||||
|
||||
#[actix_web::main]
|
||||
async fn main() -> std::io::Result<()> {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
use std::io::Write;
|
||||
|
||||
pub fn encrypt(msg: &str) -> String {
|
||||
let pgp = gnupg::GnuPG::new().expect("no gpg");
|
||||
let pgp = gnupg_rs::GnuPG::new().expect("no gpg");
|
||||
let pub_key = pgp
|
||||
.import_key(&std::fs::read_to_string("./config/pub.key").expect("key could not be read"))
|
||||
.expect("key import error");
|
||||
|
|
|
@ -82,7 +82,7 @@ pub async fn public_key(r: HttpRequest) -> Result<impl Responder, Error> {
|
|||
)
|
||||
.expect("could not read key");
|
||||
|
||||
let pgp = gnupg::GnuPG::new().expect("no gpg");
|
||||
let pgp = gnupg_rs::GnuPG::new().expect("no gpg");
|
||||
let key_name = pgp.import_key(&key).expect("key not valid").name;
|
||||
let key = key.replace('\n', "<br>");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue