mod key;
pub mod file;
pub use key::Key;
pub use file::*;
#[derive(PartialEq, Debug, Copy, Clone)]
pub enum KeyTypes {
None,
PublicKey,
SecretKey,
Ciphertext,
SharedSecret,
}
impl KeyTypes {
pub fn none() -> Self {
Self::None
}
pub fn public_key() -> Self {
Self::PublicKey
}
pub fn secret_key() -> Self {
Self::SecretKey
}
pub fn ciphertext() -> Self {
Self::Ciphertext
}
pub fn shared_secret() -> Self {
Self::SharedSecret
}
}
#[derive(PartialEq, Debug, Copy, Clone)]
pub enum FileTypes {
Other,
PublicKey,
SecretKey,
Ciphertext,
Message,
File,
}
impl FileTypes {
pub fn other() -> Self {
Self::Other
}
pub fn public_key() -> Self {
Self::PublicKey
}
pub fn secret_key() -> Self {
Self::SecretKey
}
pub fn ciphertext() -> Self {
Self::Ciphertext
}
pub fn message() -> Self {
Self::Message
}
pub fn file() -> Self {
Self::File
}
}
#[derive(PartialEq, Debug, Copy, Clone)]
pub enum FileState {
Other,
NotEncrypted,
Encrypted,
Decrypted,
Hex,
}
impl FileState {
pub fn other() -> Self {
Self::Other
}
pub fn not_encrypted() -> Self {
Self::NotEncrypted
}
pub fn encrypted() -> Self {
Self::Encrypted
}
pub fn decrypted() -> Self {
Self::Decrypted
}
pub fn hex() -> Self {
Self::Hex
}
}