Home
last modified time | relevance | path

Searched refs:outlen (Results 1 – 4 of 4) sorted by relevance

/demos/cipher/
A Dariacbc.c60 int outlen, tmplen; in aria_cbc_encrypt() local
87 if (!EVP_EncryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aria_cbc_encrypt()
89 outlen += tmplen; in aria_cbc_encrypt()
92 printf("Ciphertext (outlen:%d):\n", outlen); in aria_cbc_encrypt()
93 BIO_dump_fp(stdout, outbuf, outlen); in aria_cbc_encrypt()
95 if (sizeof(cbc_ct) == outlen && !CRYPTO_memcmp(outbuf, cbc_ct, outlen)) in aria_cbc_encrypt()
116 int outlen, tmplen; in aria_cbc_decrypt() local
144 outlen += tmplen; in aria_cbc_decrypt()
147 printf("Plaintext (outlen:%d):\n", outlen); in aria_cbc_decrypt()
148 BIO_dump_fp(stdout, outbuf, outlen); in aria_cbc_decrypt()
[all …]
A Daeskeywrap.c61 int outlen, tmplen; in aes_wrap_encrypt() local
90 if (!EVP_EncryptFinal_ex(ctx, outbuf + outlen, &tmplen)) in aes_wrap_encrypt()
92 outlen += tmplen; in aes_wrap_encrypt()
95 printf("Ciphertext (outlen:%d):\n", outlen); in aes_wrap_encrypt()
96 BIO_dump_fp(stdout, outbuf, outlen); in aes_wrap_encrypt()
98 if (sizeof(wrap_ct) == outlen && !CRYPTO_memcmp(outbuf, wrap_ct, outlen)) in aes_wrap_encrypt()
119 int outlen, tmplen; in aes_wrap_decrypt() local
149 outlen += tmplen; in aes_wrap_decrypt()
152 printf("Plaintext (outlen:%d):\n", outlen); in aes_wrap_decrypt()
153 BIO_dump_fp(stdout, outbuf, outlen); in aes_wrap_decrypt()
[all …]
A Daesgcm.c75 int outlen, tmplen; in aes_gcm_encrypt() local
110 if (!EVP_EncryptUpdate(ctx, NULL, &outlen, gcm_aad, sizeof(gcm_aad))) in aes_gcm_encrypt()
114 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, gcm_pt, sizeof(gcm_pt))) in aes_gcm_encrypt()
119 BIO_dump_fp(stdout, outbuf, outlen); in aes_gcm_encrypt()
152 int outlen, rv; in aes_gcm_decrypt() local
182 if (!EVP_DecryptUpdate(ctx, NULL, &outlen, gcm_aad, sizeof(gcm_aad))) in aes_gcm_decrypt()
186 if (!EVP_DecryptUpdate(ctx, outbuf, &outlen, gcm_ct, sizeof(gcm_ct))) in aes_gcm_decrypt()
191 BIO_dump_fp(stdout, outbuf, outlen); in aes_gcm_decrypt()
201 rv = EVP_DecryptFinal_ex(ctx, outbuf, &outlen); in aes_gcm_decrypt()
A Daesccm.c76 int outlen, tmplen; in aes_ccm_encrypt() local
116 if (!EVP_EncryptUpdate(ctx, NULL, &outlen, NULL, sizeof(ccm_pt))) in aes_ccm_encrypt()
120 if (!EVP_EncryptUpdate(ctx, NULL, &outlen, ccm_adata, sizeof(ccm_adata))) in aes_ccm_encrypt()
124 if (!EVP_EncryptUpdate(ctx, outbuf, &outlen, ccm_pt, sizeof(ccm_pt))) in aes_ccm_encrypt()
129 BIO_dump_fp(stdout, outbuf, outlen); in aes_ccm_encrypt()
163 int outlen, rv; in aes_ccm_decrypt() local
200 if (!EVP_DecryptUpdate(ctx, NULL, &outlen, NULL, sizeof(ccm_ct))) in aes_ccm_decrypt()
204 if (!EVP_DecryptUpdate(ctx, NULL, &outlen, ccm_adata, sizeof(ccm_adata))) in aes_ccm_decrypt()
208 rv = EVP_DecryptUpdate(ctx, outbuf, &outlen, ccm_ct, sizeof(ccm_ct)); in aes_ccm_decrypt()
213 BIO_dump_fp(stdout, outbuf, outlen); in aes_ccm_decrypt()

Completed in 6 milliseconds