Lines Matching defs:out
35 static int des_ede3_unwrap(PROV_CIPHER_CTX *ctx, unsigned char *out,
43 if (out == NULL)
54 if (out == in) {
55 memmove(out, out + 8, inl - 8);
58 ctx->hw->cipher(ctx, out, in + 8, inl - 16);
63 BUF_reverse(out, NULL, inl - 16);
66 ctx->hw->cipher(ctx, out, out, inl - 16);
68 if (ossl_sha1(out, inl - 16, sha1tmp) /* Work out hash of first portion */
76 OPENSSL_cleanse(out, inl - 16);
81 static int des_ede3_wrap(PROV_CIPHER_CTX *ctx, unsigned char *out,
89 if (out == NULL)
93 memmove(out + ivlen, in, inl);
94 /* Work out ICV */
97 memcpy(out + inl + ivlen, sha1tmp, icvlen);
102 memcpy(out, ctx->iv, ivlen);
104 ctx->hw->cipher(ctx, out + ivlen, out + ivlen, inl + ivlen);
105 BUF_reverse(out, NULL, len);
107 ctx->hw->cipher(ctx, out, out, len);
111 static int tdes_wrap_cipher_internal(PROV_CIPHER_CTX *ctx, unsigned char *out,
122 return des_ede3_wrap(ctx, out, in, inl);
124 return des_ede3_unwrap(ctx, out, in, inl);
128 unsigned char *out, size_t *outl, size_t outsize,
143 ret = tdes_wrap_cipher_internal(ctx, out, in, inl);
151 static int tdes_wrap_update(void *vctx, unsigned char *out, size_t *outl,
163 if (!tdes_wrap_cipher(vctx, out, outl, outsize, in, inl)) {