Encrypting password issue

One Star

Encrypting password issue

Hi
I followed the procedure described by Shong on this link :-
https://help.talend.com/pages/viewpage.action?pageId=28671224&focusedCommentId=31065832#comment-3106...
Now i have doubt regarding default value of context variable,is it the actual password or something else?
please light on the issue if anyone have gone through it.
Apart from this when i am trying to connect to oracle 10g database using procedure above described i am getting following error:
Exception in component tOracleInput_1
java.sql.SQLException: ORA-01017: invalid username/password; logon denied
When i manually enter password,no issue at all.I easily get connected to database and can fire any query i want.
Five Stars

Re: Encrypting password issue

Hi,
The default value of your context variable must be the encrypted value.
Use this site to encrypt your password
http://rot13.com
Regards
Five Stars

Re: Encrypting password issue

Note that ROT13 is a poor encoding method, just the 26 letters are encoded, and it's reversible : encode 2 times your password (click 2 times on Cypher) and your password will be shown again...
One Star

Re: Encrypting password issue

Hi Viannou,
First of all thanks for you reply and your suggestions regarding ROT13 algo and its pitfalls.
It works for me
Thanks a ton for that..
I have another doubt What if password contains some numeric value,in that ROT13 won't encrypt that.
Can you provide me any link or demo showing how to encrypt such password in talend job.

With Regards
Sanjay Tiwari
Five Stars

Re: Encrypting password issue

Look at the ROT13 java code
            if (c >= 'a' && c <= 'm')
c += 13;
else if (c >= 'A' && c <= 'M')
c += 13;
else if (c >= 'n' && c <= 'z')
c -= 13;
else if (c >= 'N' && c <= 'Z')
c -= 13;

It's based on the ascii table. It says : "when you have a 'a' transform it with de 13th leter after 'a' (= 'n') "
This should do the job for numbers...
            else if (c >= '0' && c <= '4')
c += 5;
else if (c >= '5' && c <= '9')
c -= 5;

0 --> 5
1 --> 6
2 --> 7
3 --> 8
4 --> 9
5 --> 0
6 --> 1
7 --> 2
8 --> 3
9 --> 4
One Star

Re: Encrypting password issue

Hi
Thanks for nice explaination,So you are saying i should use ROT5 with ROT13.
what i have got you are just dividing the whole alphabets or number available such 26/2=13 in case of alphabets(ROT13) and 10/2=5 in case of numbers(ROT5).You are adding 13 or 5 accordingly,that's fine.
But what if password contains characters like #,@,$ and so on,in that case what to do? Would you please provide me code how can i use ROT47 if problem(@,#,$,%) cann't be solved using ROT13
Five Stars

Re: Encrypting password issue

rot13 is not encryption and should not be used for passwords.
If you really want to encrypt your passwords, you should be looking at something like pgp or gpg.
rot13 was maybe good enough 2000 years ago.
One Star

Re: Encrypting password issue

Thanks a ton tal00000 for your suggestions.I will go through what you have specified.