dmg2img: fix patch's whitespace

This commit is contained in:
Đoàn Trần Công Danh 2022-08-26 22:44:06 +07:00
parent 69b3dc67d5
commit 5128f52d4c

View file

@ -15,11 +15,9 @@ Fixes https://github.com/Lekensteyn/dmg2img/issues/4
vfdecrypt.c | 103 ++++++++++++++++++++++++++++++++++++++++++++++--------------
1 file changed, 80 insertions(+), 23 deletions(-)
diff --git a/vfdecrypt.c b/vfdecrypt.c
index 56d3530..b1a36d3 100644
--- a/vfdecrypt.c
+++ b/vfdecrypt.c
@@ -183,7 +183,7 @@ void adjust_v2_header_byteorder(cencrypted_v2_pwheader *pwhdr) {
@@ -183,7 +183,7 @@ void adjust_v2_header_byteorder(cencrypt
pwhdr->encrypted_keyblob_size = htonl(pwhdr->encrypted_keyblob_size);
}
@ -28,7 +26,7 @@ index 56d3530..b1a36d3 100644
AES_KEY aes_decrypt_key;
int CHUNK_SIZE=4096; // default
@@ -196,9 +196,9 @@ void compute_iv(uint32_t chunk_no, uint8_t *iv) {
@@ -196,9 +196,9 @@ void compute_iv(uint32_t chunk_no, uint8
unsigned int mdLen;
chunk_no = OSSwapHostToBigInt32(chunk_no);
@ -41,7 +39,7 @@ index 56d3530..b1a36d3 100644
memcpy(iv, mdResult, CIPHER_BLOCKSIZE);
}
@@ -212,52 +212,75 @@ void decrypt_chunk(uint8_t *ctext, uint8_t *ptext, uint32_t chunk_no) {
@@ -212,52 +212,75 @@ void decrypt_chunk(uint8_t *ctext, uint8
/* DES3-EDE unwrap operation loosely based on to RFC 2630, section 12.6
* wrapped_key has to be 40 bytes in length. */
int apple_des3_ede_unwrap_key(uint8_t *wrapped_key, int wrapped_key_len, uint8_t *decryptKey, uint8_t *unwrapped_key) {
@ -128,7 +126,7 @@ index 56d3530..b1a36d3 100644
return(0);
}
@@ -279,31 +302,46 @@ int unwrap_v1_header(char *passphrase, cencrypted_v1_header *header, uint8_t *ae
@@ -279,31 +302,46 @@ int unwrap_v1_header(char *passphrase, c
int unwrap_v2_header(char *passphrase, cencrypted_v2_pwheader *header, uint8_t *aes_key, uint8_t *hmacsha1_key) {
/* derived key is a 3DES-EDE key */
uint8_t derived_key[192/8];