mirror of
https://github.com/logos-messaging/libchat.git
synced 2026-02-11 09:23:26 +00:00
* Load orginal protofiles * Change package name * Add prost generation * Remove placeholders * Add generated files + imports * replace with chat-proto * Add XK0 * auto formatting * Initial implementation of PrivateV1 initialization * Add ConvoFactory trait * Hook up indentity placeholder * Remove RemoteInbox until it’s needed * Simplify Identity ownership * Clean up x3handshake * Move inbox encryption * Simplify inbox encryption * Cleanup warnings * Add todos * Update chat-proto crate * Publickey Handling * Reorg Inbox handshake * Update Inbox convoId * Remove file structure headers * Update ConvoID * Add Domain Separator trait * Remove Convo trait functions * Rename Context * Add SecretKey * Add workspace dependency * update KE name * Update comments for clarity * Remove Xk0 references * Bump chat_proto version and relock
18 lines
392 B
Rust
18 lines
392 B
Rust
pub use blake2::Digest;
|
|
use blake2::{Blake2b, digest};
|
|
use prost::bytes::Bytes;
|
|
pub use x25519_dalek::{PublicKey, StaticSecret};
|
|
|
|
pub trait CopyBytes {
|
|
fn copy_to_bytes(&self) -> Bytes;
|
|
}
|
|
|
|
impl CopyBytes for PublicKey {
|
|
fn copy_to_bytes(&self) -> Bytes {
|
|
Bytes::copy_from_slice(self.as_bytes())
|
|
}
|
|
}
|
|
|
|
#[allow(dead_code)]
|
|
pub type Blake2b128 = Blake2b<digest::consts::U16>;
|