Function report |
Source Code:lib\crypto\blake2s-selftest.c |
Create Date:2022-07-28 06:44:15 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:blake2s_selftest
Proto:bool __init blake2s_selftest(void)
Type:bool
Parameter:Nothing
| 572 | bool success = true |
| 583 | outlen = 1 + i % BLAKE2S_HASH_SIZE |
| 584 | keylen = 13 * i % (BLAKE2S_KEY_SIZE + 1) |
| 593 | If Not keylen Then blake2s_init( & state, outlen) |
| 595 | Else blake2s_init_key( & state, outlen, key + BLAKE2S_KEY_SIZE - keylen, keylen) |
| 600 | blake2s_update( & state, buf, l) |
| 602 | blake2s_final( & state, hash) |
| 610 | If success Then |
| 612 | success &= Not memcmp(hash, blake2s_hmac_testvecs[0], BLAKE2S_HASH_SIZE) |
| 615 | success &= Not memcmp(hash, blake2s_hmac_testvecs[1], BLAKE2S_HASH_SIZE) |
| 621 | Return success |
| Name | Describe |
|---|---|
| mod_init |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |