下你所需,载你所想!
汇集开发技术源码资料

新一代散列算法MD2,MD4,MD5,SHA1,SHA256,SHA384,SHA512

:2.387KB :1 :2023-05-24 17:14:05

部分简介

BCryptOpenAlgorithmProvider (phAlgorithm, pszAlgId, 0, 0)
BCryptGetProperty (phAlgorithm, { 79, 0, 98, 0, 106, 0, 101, 0, 99, 0, 116, 0, 76, 0, 101, 0, 110, 0, 103, 0, 116, 0, 104, 0, 0, 0 }, pbOutput, 4, cbOutput, 0)
pbHashObject = 取空白字节集 (pbOutput)
cbHashObject = pbOutput
BCryptCreateHash (phAlgorithm, phHash, pbHashObject, cbHashObject, 0, 0, 0)
BCryptHashData (phHash, 数据, 取字节集长度 (数据), 0)
BCryptGetProperty (phAlgorithm, { 72, 0, 97, 0, 115, 0, 104, 0, 68, 0, 105, 0, 103, 0, 101, 0, 115, 0, 116, 0, 76, 0, 101, 0, 110, 0, 103, 0, 116, 0, 104, 0, 0, 0 }, pbOutput, 4, cbOutput, 0)
Hash = 取空白字节集 (pbOutput)
BCryptFinishHash (phHash, Hash, pbOutput, 0)
data = { 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 65, 66, 67, 68, 69, 70 }
MD5 = 取空白字节集 (pbOutput × 2)

新一代散列算法MD2,MD4,MD5,SHA1,SHA256,SHA384,SHA512

热门推荐

相关文章