Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\crypto\sha256.c Create Date:2022-07-28 06:48:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__sha256_final

Proto:static int __sha256_final(struct sha256_state *sctx, u8 *out, int digest_words)

Type:int

Parameter:

TypeParameterName
struct sha256_state *sctx
u8 *out
intdigest_words
248  dst = out
252  static const u8 padding[64] = {0x80, }
255  bits = cpu_to_be64(count << 3)
258  index = count & 0x3f
259  pad_len = If index < 56 Then 56 - index Else 64 + 56 - index
260  sha256_update(sctx, padding, pad_len)
263  sha256_update(sctx, (constu8 * ) & bits, size of bits )
266  When i < digest_words cycle put_unaligned_be32(state[i], & dst[i])
270  memset(sctx, 0, size of sctx )
272  Return 0
Caller
NameDescribe
sha256_final
sha224_final