memset(ctx->tweak, 0, 15);
ctx->tweak[15] = 0x40+type;
memcpy(ctx->g, g, UBI1024_BLOCKSIZE_B);
memset(ctx->tweak, 0, 15);
ctx->tweak[15] = 0x40+type;
memcpy(ctx->g, g, UBI1024_BLOCKSIZE_B);
threefish1024_ctx_t tfctx;
((uint64_t*)(ctx->tweak))[0] += UBI1024_BLOCKSIZE_B;
threefish1024_init(ctx->g, ctx->tweak, &tfctx);
threefish1024_ctx_t tfctx;
((uint64_t*)(ctx->tweak))[0] += UBI1024_BLOCKSIZE_B;
threefish1024_init(ctx->g, ctx->tweak, &tfctx);
threefish1024_ctx_t tfctx;
while(length_b>UBI1024_BLOCKSIZE){
ubi1024_nextBlock(ctx, block);
threefish1024_ctx_t tfctx;
while(length_b>UBI1024_BLOCKSIZE){
ubi1024_nextBlock(ctx, block);