|
Versions Of This Snippet::
Download a raw-text version of this code by clicking on "Download Version"
Latest Snippet Version: :1
function F_cripto(
p_valor in varchar2 )
return varchar2
is
sCripto varchar2(100) := '';
cChar char(1);
nAsc number;
begin
for i in 1..length(p_valor) loop -- percorre toda a string recebida
cChar := substr( p_valor, i, 1 ); -- valor ASCII de cada caractere
nAsc := 255 - ascii( cChar ); -- valor ASCII invertido do caractere
sCripto := sCripto || chr( nAsc ); -- adiciona caractere invertido à string de saída
end loop;
return( sCripto );
end F_cripto;
Submit a new versionYou can submit a new version of this snippet if you have modified it and you feel it is appropriate to share with others..
|
||||||||||||||||||||||||||
