Old 30th January 2012, 06:10   #1
dinesh.guntha
Junior Member
 
Join Date: Jan 2012
Posts: 16
Password encryption in NSIS

Hi All,

I am new to nsis scripting, i want to Encrypt my password and store in the server.properties file by using external password encryption. My problem is after entering the password then should encrypt and store in the file.

Can any suggest me how to do?

Thanks in Advance..
dinesh.guntha is offline   Reply With Quote
Old 30th January 2012, 07:43   #2
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
More information would help. What kind of encryption do you need? What server software are we talking about?
MSG is offline   Reply With Quote
Old 30th January 2012, 08:20   #3
dinesh.guntha
Junior Member
 
Join Date: Jan 2012
Posts: 16
I want use the jasypt jar and use to encrypt and store in the file [server.properties]

In that file jdbc.username = user
jdbc.password = password [ this i need to encrypt]

When user enter user name & password that values are storing in the file but now i need to
encrypt passwords

some data using to write into file: but i need to encrypt the passwords using the jasypt jar file
Function ModifyConfigurationFiles

;Configuration de l'addresse IP de la base de données
Push @DB_ADDRESS@ #text to be replaced
Push $db_address_state #replace with
Push all #replace all occurrences
Push all #replace all occurrences
Push "$INSTDIR\conf\server.properties" #file to replace in
Call AdvReplaceInFile #call find and replace function


;Configuration du login de la base de données
Push @DB_LOGIN@ #text to be replaced
Push $db_login_state #replace with
Push all #replace all occurrences
Push all #replace all occurrences
Push "$INSTDIR\conf\server.properties" #file to replace in
Call AdvReplaceInFile #call find and replace function


;Configuration du password de la base de données
Push @DB_PASSWORD@ #text to be replaced
Push $db_password_state #replace with
Push all #replace all occurrences
Push all #replace all occurrences
Push "$INSTDIR\conf\server.properties" #file to replace in
Call AdvReplaceInFile #call find and replace function

FunctionEnd
dinesh.guntha is offline   Reply With Quote
Old 30th January 2012, 08:22   #4
dinesh.guntha
Junior Member
 
Join Date: Jan 2012
Posts: 16
By using the jasypt[java jar format] i need to encrypt the password & store in the file
dinesh.guntha is offline   Reply With Quote
Old 30th January 2012, 08:40   #5
dinesh.guntha
Junior Member
 
Join Date: Jan 2012
Posts: 16
Quote:
Originally Posted by MSG View Post
More information would help. What kind of encryption do you need? What server software are we talking about?
BasicPasswordEncryptor passwordEncryptor = new BasicPasswordEncryptor();
String encryptedPassword = passwordEncryptor.encryptPassword(userPassword);
by using the jaspyt [java jar file for encryption] do it & store in the file.
dinesh.guntha is offline   Reply With Quote
Old 30th January 2012, 08:54   #6
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
If that's what you're talking about, then you already asked this question here: http://forums.winamp.com/showthread.php?t=340816

Please do not ask the same question twice.
MSG is offline   Reply With Quote
Old 30th January 2012, 09:09   #7
dinesh.guntha
Junior Member
 
Join Date: Jan 2012
Posts: 16
ok.
what should i do for encrypting the password by the jar file .
Can you suggest me on this topic.
dinesh.guntha is offline   Reply With Quote
Old 30th January 2012, 10:22   #8
dinesh.guntha
Junior Member
 
Join Date: Jan 2012
Posts: 16
By using the jar file how to encrypt the passwords in nsis script can any one help in this topic
dinesh.guntha is offline   Reply With Quote
Old 30th January 2012, 11:39   #9
Anders
Moderator
 
Anders's Avatar
 
Join Date: Jun 2002
Location: ${NSISDIR}
Posts: 5,504
I assume you are talking about http://www.jasypt.org/api/jasypt/1.8...Encryptor.html but that page says it is a salted MD5 hash and you are talking about encryption. You already asked this question in another thread and it is pretty rude to ask it again without providing us any new information. You can either find a external tool that you can execute or figure out exactly what kind of cryptographic operation you need to perform (if it is encryption we at least need to know the cipher before we can help)

IntOp $PostCount $PostCount + 1
Anders is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump