others/fw-verif/8051secureboot/fw/rsa.c
// copy seed into the PRG state
copy seed into the PRG state
copy seed into the PRG state
void PRGinit(unsigned char *seed, unsigned int slen, unsigned char *state)
{
    unsigned int i;
    if(slen > H) slen = H;
    unlock(page, state, state+H);
    writecarr(page, state, seed, slen);
    for(i=slen; i<H; i++)
        writec(page, state+i, 0, 1);
    lock(page, state, state+H);
}
void PRGinit ( unsigned char * seed , unsigned int slen , unsigned char * state ) { unsigned int i ; if ( slen > H ) slen = H ; unlock ( page , state , state + H ) ; writecarr ( page , state , seed , slen ) ; for ( i = slen ; i < H ; i ++ ) writec ( page , state + i , 0 , 1 ) ; lock ( page , state , state + H ) ; }
copy seed into the PRG state
copy seed into the PRG state