mirror of
				https://github.com/wangyu-/udp2raw.git
				synced 2025-11-01 02:35:37 +08:00 
			
		
		
		
	trival
This commit is contained in:
		| @@ -31,9 +31,9 @@ void AES_CBC_encrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, co | ||||
| 		aes_init( &ctx); | ||||
| 		done=1; | ||||
| 	} | ||||
|  | ||||
| 	char tmp_iv[16]; | ||||
| 	if(key!=0) aes_setkey_enc(&ctx,key,AES_KEYSIZE); | ||||
|  | ||||
| 	memcpy(tmp_iv,iv,16); | ||||
| 	aes_crypt_cbc( &ctx, AES_ENCRYPT, length, (unsigned char* )tmp_iv, (const unsigned char*)input,(unsigned char*) output ); | ||||
| 	return ; | ||||
| @@ -47,6 +47,7 @@ void AES_CBC_decrypt_buffer(uint8_t* output, uint8_t* input, uint32_t length, co | ||||
| 		aes_init( &ctx); | ||||
| 		done=1; | ||||
| 	} | ||||
|  | ||||
| 	char tmp_iv[16]; | ||||
| 	if(key!=0) aes_setkey_dec(&ctx,key,AES_KEYSIZE); | ||||
| 	memcpy(tmp_iv,iv,16); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user