Lines Matching refs:ret
56 int ret; in example() local
73 ret = mbedtls_ctr_drbg_seed(&drbg, mbedtls_entropy_func, &entropy, in example()
75 if (ret != 0) { in example()
76 printf("mbedtls_ctr_drbg_init() returned -0x%04X\r\n", -ret); in example()
87 ret = mbedtls_cipher_setup(&ctx, mbedtls_cipher_info_from_type(MBEDTLS_CIPHER_AES_128_CCM)); in example()
88 if (ret != 0) { in example()
89 printf("mbedtls_cipher_setup() returned -0x%04X\r\n", -ret); in example()
93 ret = mbedtls_cipher_setkey(&ctx, secret_key, 8 * sizeof secret_key, MBEDTLS_ENCRYPT); in example()
94 if (ret != 0) { in example()
95 printf("mbedtls_cipher_setkey() returned -0x%04X\r\n", -ret); in example()
119 ret = mbedtls_cipher_auth_encrypt(&ctx, ciphertext, nonce_len, in example()
124 if (ret != 0) { in example()
125 printf("mbedtls_cipher_auth_encrypt() returned -0x%04X\r\n", -ret); in example()
143 ret = mbedtls_cipher_setkey(&ctx, secret_key, 8 * sizeof secret_key, MBEDTLS_DECRYPT); in example()
144 if (ret != 0) { in example()
145 printf("mbedtls_cipher_setkey() returned -0x%04X\r\n", -ret); in example()
149 ret = mbedtls_cipher_auth_decrypt(&ctx, in example()
156 if (ret == MBEDTLS_ERR_CIPHER_AUTH_FAILED) { in example()
160 if (ret != 0) { in example()
161 printf("mbedtls_cipher_authdecrypt() returned -0x%04X\r\n", -ret); in example()