DECLARE
  l_hash varchar2(240);
BEGIN
  FOR l_pwd IN (SELECT id, username
                  FROM parties
                 WHERE username IS NOT NULL) LOOP
  
    l_hash := mip_security.get_hash(p_username=>l_pwd.username, p_password=>'password');
  
    INSERT INTO passwords
      (prty_id
      ,password_hash
      ,created_on)
    VALUES
      (l_pwd.id
      ,l_hash
      ,SYSDATE);
  END LOOP;
END;
/
exit
