def pwReencrypt(epw, oldPassword, newPassword):
 (plaintext, ok) = pwDecrypt(epw, oldPassword)
 if ok:
  return pwEncrypt(plaintext, newPassword)
 else:
  return (u'', False)

def pwReencrypt ( epw , oldPassword , newPassword ) : ( plaintext , ok ) = pwDecrypt ( epw , oldPassword ) if ok : return pwEncrypt ( plaintext , newPassword ) else : return ( u'' , False )
module function to re-encrypt a password .