title: Password encryption function is not working in Oracle 11g
body: <p>The function is not working in Oracle 11g.</p>
  
  <p>I did use the same function in the Oracle 8i database and it is working. </p>
  
  <pre><code>create or replace FUNCTION chePass( pa char) RETURN char is a varchar2(50);
  b char(1);
  c number(4):=0;
  H varchar2(30);
  BEGIN
  
    if pa is null then
      return null;
    end if;
    a:=rtrim(pa);
     for i in 1..length(a) loop
     b:=substr(a,i,1);
     c:=ASCII(b);
  
      IF C &lt;= 27*i then
         c:=(255+c)- (27*i);
      else
         c:=c - (27*i);
      end if;
           H:= H || chr(c);  
  
     end loop;
  return H; 
  END;
  </code></pre>
  
  <p>Please help me to resolve the problem.</p>