incubator-nuttx/include/crypto
anjiahao 43d2c595b1 crypto:support crypto can handle streaming data
in user space
Use the flag (COP_FLAG_UPDATE)structure member to mark
whether it is just input data.
like this:
can do manys times,just input data
....

  cryp.ses = session.ses;
  cryp.op = COP_ENCRYPT;
  cryp.src = (caddr_t) s;
  cryp.len = len;
  cryp.flags = COP_FLAG_UPDATE;
  cryp.dst = 0;
  cryp.mac = (caddr_t) out;
  cryp.iv = 0;
  if (ioctl(cryptodev_fd, CIOCCRYPT, &cryp) == -1)
    {
      warn("CIOCCRYPT");
      goto err;
    }

can do manys times like frist...

then,the last time

Don't use any flay structure member to mark
this is last time,need get final result
....
  cryp.ses = session.ses;
  cryp.op = COP_ENCRYPT;
  cryp.src = (caddr_t) s;
  cryp.len = len;
  cryp.flags = 0;
  cryp.dst = 0;
  cryp.mac = (caddr_t) out;
  cryp.iv = 0;
  if (ioctl(cryptodev_fd, CIOCCRYPT, &cryp) == -1)
    {
      warn("CIOCCRYPT");
      goto err;
    }
....
that will get last result.

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-17 01:19:38 +08:00
..
aes.h crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
blf.h crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
cast.h crypto:convert code style form openbsd to nuttx 2022-12-14 02:33:56 +08:00
chachapoly.h crypto:convert code style form openbsd to nuttx 2022-12-14 02:33:56 +08:00
cmac.h crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
cryptodev.h crypto:support crypto can handle streaming data 2023-01-17 01:19:38 +08:00
cryptosoft.h crypto:support crypto can handle streaming data 2023-01-17 01:19:38 +08:00
gmac.h crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
hmac.h crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
idgen.h crypto:convert code style form openbsd to nuttx 2022-12-14 02:33:56 +08:00
key_wrap.h crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
md5.h crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
poly1305.h crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
rijndael.h crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
rmd160.h crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
sha1.h crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
sha2.h crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
siphash.h crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00
xform.h crypto:support nuttx /dev/crypto 2022-12-14 02:33:56 +08:00