File Decryption

This interface helps you decrypt files you have downloaded using symmetric encryption algorithms.Here is the sample code to decrypt data.

use cess_rust_sdk::core::crypt;

fn main() {
    let cipher_text="test user cipher text ...".as_bytes();
    let key="test user aes key".as_bytes();
    let plain_text=crypt::aes_cbc_decrypt(cipher_text, key).unwrap();
    println!("decrypt cipher text success, the plain text is{:?}",plain_text);
}

If you first perform redundant encoding and fragmentation operations on the file, and then encrypt each fragment, after you download the corresponding fragments, you need to decrypt each fragment first and then restore it to your user file.

Last updated