=SODIUM_CRYPTO_GENERICHASH_BYTES string The initialization method for the streaming generichash API. 参数¶ key The generichash key. length The expected output length of the hash function. 返回值¶ Returns a hash state, serialized as a raw binary string. ...
示例#1 sodium_crypto_generichash_final() example <?php$messages = [random_bytes(32), random_bytes(32), random_bytes(16)];$state = sodium_crypto_generichash_init('', 32);foreach ($messages as $message) { sodium_crypto_generichash_update($state, $message);}$final = sodium_crypto_gener...
EXPORT_SYMBOL_GPL(sha256_zero_message_hash); static int crypto_sha256_init(struct shash_desc *desc) { sha256_init(shash_desc_ctx(desc)); return 0; } static int crypto_sha224_init(struct shash_desc *desc) { sha224_init(shash_desc_ctx(desc)); return 0; } int crypto_sha256_update...
CRYPTO (1). Lecture Notes in Computer Science, vol. 8616, pp. 149-168. Springer (2014)Dinur, I., Leurent, G.: Improved generic attacks against hash-based MACs and HAIFA. In: Garay, J.A., Gennaro, R. (eds.) [16], pp. 149–168...
示例#1 sodium_crypto_generichash_update() example <?php$messages = [random_bytes(32), random_bytes(32), random_bytes(16)];$state = sodium_crypto_generichash_init();foreach ($messages as $message) { sodium_crypto_generichash_update($state, $message);}$final = sodium_crypto_generichash_...
sodium_crypto_generichash_keygen— Generate a random generichash key说明 ¶ sodium_crypto_generichash_keygen(): string Generate a random key for use with the generichash API. 参数 ¶ 此函数没有参数。返回值 ¶ A random 256-bit key. 发现...