rclonedecrypt 0.2.41

CLI to decrypt rclone-encrypted files
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use anyhow::Result;
use thiserror::Error;

#[derive(Error, Debug)]
pub enum DecryptionError {
	#[error("Invalid file format")]
	InvalidFormat,
	#[error("Invalid password")]
	InvalidPassword,
	#[error("IO error: {0}")]
	Io(#[from] std::io::Error),
	#[error("Base64 decode error: {0}")]
	Base64(#[from] base64::DecodeError),
	#[error("Hex decode error: {0}")]
	Hex(#[from] hex::FromHexError),
}

pub type DecryptionResult<T> = Result<T, DecryptionError>;