desc.tfm = tfm;
desc.flags = crypto_hash_get_flags(parent);
desc.flags &= CRYPTO_TFM_REQ_MAY_SLEEP;
- sg_set_buf(&tmp, inkey, keylen);
+ sg_init_one(&tmp, inkey, keylen);
err = crypto_hash_digest(&desc, &tmp, keylen, digest);
if (err)
desc.tfm = ctx->child;
desc.flags = pdesc->flags & CRYPTO_TFM_REQ_MAY_SLEEP;
- sg_set_buf(&tmp, ipad, bs);
+ sg_init_one(&tmp, ipad, bs);
err = crypto_hash_init(&desc);
if (unlikely(err))
desc.tfm = ctx->child;
desc.flags = pdesc->flags & CRYPTO_TFM_REQ_MAY_SLEEP;
- sg_set_buf(&tmp, opad, bs + ds);
+ sg_init_one(&tmp, opad, bs + ds);
err = crypto_hash_final(&desc, digest);
if (unlikely(err))