43d2c595b1
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> |
||
---|---|---|
.. | ||
arpa | ||
crypto | ||
cxx | ||
net | ||
netinet | ||
netpacket | ||
nuttx | ||
ssp | ||
sys | ||
.gitignore | ||
aio.h | ||
alloca.h | ||
assert.h | ||
byteswap.h | ||
ctype.h | ||
debug.h | ||
dirent.h | ||
dlfcn.h | ||
dsp.h | ||
dspb16.h | ||
elf32.h | ||
elf64.h | ||
elf.h | ||
endian.h | ||
err.h | ||
errno.h | ||
execinfo.h | ||
fcntl.h | ||
fixedmath.h | ||
fnmatch.h | ||
ftw.h | ||
getopt.h | ||
glob.h | ||
grp.h | ||
hex2bin.h | ||
ifaddrs.h | ||
inttypes.h | ||
iso646.h | ||
langinfo.h | ||
libgen.h | ||
libintl.h | ||
limits.h | ||
locale.h | ||
lzf.h | ||
malloc.h | ||
mqueue.h | ||
netdb.h | ||
nl_types.h | ||
nxflat.h | ||
obstack.h | ||
poll.h | ||
pthread.h | ||
pty.h | ||
pwd.h | ||
resolv.h | ||
sched.h | ||
semaphore.h | ||
signal.h | ||
spawn.h | ||
stdbool.h | ||
stddef.h | ||
stdint.h | ||
stdio.h | ||
stdlib.h | ||
stdnoreturn.h | ||
string.h | ||
strings.h | ||
syscall.h | ||
syslog.h | ||
termios.h | ||
threads.h | ||
time.h | ||
unistd.h | ||
utime.h | ||
uuid.h | ||
wchar.h | ||
wctype.h |