<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def _jks_keystream(iv, password):
 """Helper keystream generator for _jks_pkey_decrypt"""

    cur = iv
    while 1:
        xhash = hashlib.sha1(bytes(password + cur)) # hashlib.sha1 in python 2.6 does not accept a bytearray argument
        cur = bytearray(xhash.digest()) # make sure we iterate over ints in both Py2 and Py3
        for byte in cur:
            yield byte