Bugfix: yaca_encrypt_final used in decryption 29/66829/1
authorDariusz Michaluk <d.michaluk@samsung.com>
Thu, 21 Apr 2016 09:45:31 +0000 (11:45 +0200)
committerDariusz Michaluk <d.michaluk@samsung.com>
Thu, 21 Apr 2016 09:45:31 +0000 (11:45 +0200)
Change-Id: I26f60bc9adfd8e55390a1522c6d36197cccc46b5

examples/encrypt.c

index eb8f3ce..303bcd7 100644 (file)
@@ -207,7 +207,7 @@ void encrypt_advanced(void)
                        goto ex_in;
 
                rem = dec_size - out_size;
-               ret = yaca_encrypt_final(ctx, dec + out_size, &rem);
+               ret = yaca_decrypt_final(ctx, dec + out_size, &rem);
                if (ret < 0)
                        goto ex_in;