<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css">
    
<div class="row">
  <div class="col-lg-12 mt-4">
    <div class="card">
      <div class="card-header form-card-header">
        <h4 class="m-b-0 text-light">CHANGE PASSWORD</h4>
      </div>
      <div class="card-body">
        <form id="change_pass" class="form-control-line">
          <div class="form-body">
            <div class="row">
              <div class="col-md-4">
                <div class="form-group">
                  <label class="control-label"><strong>OLD PASSWORD</strong> <span>*</span></label>
                  <input type="text" id="opword" name="opword" class="form-control" style="text-transform: none;" autocomplete="off" autofocus="on">
                 
                  <label for="opword" class="error"></label> 
                </div>
              </div>
             
            </div>
            <!--/row-->
            <div class="row">
              <div class="col-md-4">
                <div class="form-group">
                  <label class="control-label"><strong>NEW PASSWORD</strong> <span>*</span></label>
                  <input type="password" id="npword" name="npword" class="form-control" style="text-transform: none;" autocomplete="off">
                  <label for="npword" class="error"></label> 
                </div>
              </div>
               <div class="col-md-1"> <br><Br><i class="far fa-eye" id="togglePassword" style="margin-left: -40px;"></i></div>
            </div>

            <!--/row-->
            <div class="row">
              <div class="col-md-4">
                <div class="form-group">
                  <label class="control-label"><strong>CONFIRM NEW PASSWORD</strong> <span>*</span></label>
                  <input type="text" id="cnpword" name="cnpword" class="form-control" style="text-transform: none;" autocomplete="off">
                  <label for="cnpword" class="error"></label> 
                </div>
              </div>
            </div>
          </div>

          <?php $_SESSION["token"] = md5(uniqid(mt_rand(), true)); ?>
          <input type="hidden" name="csrfToken" id="csrfreg" value="<?php echo $_SESSION["token"];?>">

          <div class="form-actions">
            <button type="submit" class="btn btn-info col-md-3">SAVE</button>  
            <button type="button" class="btn btn-primary col-md-3" onclick="window.location.href='<?php echo base_url(); ?>admin/dashboard'">CANCEL</button>  
          </div>
        </form>
      </div>
    </div>
  </div>
</div>
 <script src="<?php echo base_url(); ?>admin-assets/js/crypto-js.min.js"></script>
<script>
  /*function crypt(password = ''){
    let pass= password;

    if (pass != ''){
      return hex_md5(pass);
    }
  
  }

  function cryptsalt(cryptpassword = ''){
    let cryptpass= cryptpassword;

    if (cryptpass != ''){
      var k = '<?=$salt?>';
      var h = hex_md5(k + cryptpass);
    }
      
    return h;
  }
  
  
  */
  
  function  admincrypt(password = ''){
        let pass= password;
        if (pass != " ")
        {
            var hvalue = CryptoJS.SHA256(pass);
            //alert(hvalue);
            return hvalue;
        }
      }
      
</script>