Skip to content

Commit 8bc5e67

Browse files
committed
docs: update example variable names and test data in encryption module
1 parent 95e092e commit 8bc5e67

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

post-compute/src/compute/encryption.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ pub const AES_IV_LENGTH: usize = 16;
7979
/// ```rust
8080
/// use tee_worker_post_compute::compute::encryption::encrypt_data;
8181
///
82-
/// const TEST_RSA_PUBLIC_KEY_PEM: &str = r#"-----BEGIN PUBLIC KEY-----
82+
/// const RSA_PUBLIC_KEY: &str = r#"-----BEGIN PUBLIC KEY-----
8383
/// MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAr0mx20CSFczJaM4rtYfL
8484
/// VHXfTybD4J85SGrI6GfPlOhAnocZOMIRJVqrYSGqfNvw6bnv3OrNp0OJ6Av7v20r
8585
/// YiciyJ/R9c7W4jLksTC0qAEr1x8IsH1rsTcgIhD+V2eQWqi05ArUg+YDQiGr/B6T
@@ -90,7 +90,7 @@ pub const AES_IV_LENGTH: usize = 16;
9090
/// -----END PUBLIC KEY-----"#;
9191
///
9292
/// let temp_file = tempfile::NamedTempFile::new().expect("Failed to create temp file");
93-
/// match std::fs::write(temp_file.path(), b"Super secret data") {
93+
/// match std::fs::write(temp_file.path(), b"Data to encrypt") {
9494
/// Ok(_) => println!("Successfully wrote to temp file"),
9595
/// Err(e) => eprintln!("Failed to write to temp file: {}", e),
9696
/// }
@@ -100,13 +100,13 @@ pub const AES_IV_LENGTH: usize = 16;
100100
/// };
101101
///
102102
/// // Encrypt a file and create a ZIP archive
103-
/// match encrypt_data(file, TEST_RSA_PUBLIC_KEY_PEM, true) {
103+
/// match encrypt_data(file, RSA_PUBLIC_KEY, true) {
104104
/// Ok(result) => println!("Encrypted ZIP created: {}", result),
105105
/// Err(e) => eprintln!("Failed to encrypt file and create ZIP archive: {:?}", e),
106106
/// }
107107
///
108108
/// // Encrypt a file and do not create a ZIP archive
109-
/// match encrypt_data(file, TEST_RSA_PUBLIC_KEY_PEM, false) {
109+
/// match encrypt_data(file, RSA_PUBLIC_KEY, false) {
110110
/// Ok(result) => println!("Encrypted files in: {}", result),
111111
/// Err(e) => eprintln!("Failed to encrypt file and create directory: {:?}", e),
112112
/// }

0 commit comments

Comments
 (0)