You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2023/01/16 07:23:11 UTC

[GitHub] [nuttx] anjiahao1 opened a new pull request, #8134: crypto:support crypto can handle streaming data

anjiahao1 opened a new pull request, #8134:
URL: https://github.com/apache/nuttx/pull/8134

   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 <an...@xiaomi.com>
   
   ## Summary
   add streaming data support for crypto
   ## Impact
   crypto
   ## Testing
   vela
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 merged pull request #8134: crypto:support crypto can handle streaming data

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #8134:
URL: https://github.com/apache/nuttx/pull/8134


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org