• David Sterba's avatar
    crypto: blake2b - simplify key init · e87e484d
    David Sterba authored
    The keyed init writes the key bytes to the input buffer and does an
    update. We can do that in two ways: fill the buffer and update
    immediatelly. This is what current blake2b_init_key does. Any other
    following _update or _final will continue from the updated state.
    
    The other way is to write the key and set the number of bytes to process
    at the next _update or _final, lazy evaluation. Which leads to the the
    simplified code in this patch.
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
    e87e484d
blake2b_generic.c 10.1 KB