Linux machine encrypt and decrypt a password string

 

1)For encrypt use below command: for the password" Ranjith" 

echo Ranjith | openssl enc -aes-256-cbc -a -salt -pass pass:tecmint


[root@ranjith]# echo Ranjith | openssl enc -aes-256-cbc -a -salt -pass pass:tecmint

U2FsdGVkX1/lvI5yT7l7fPeg/thWbJN76DlM++FltEKqWUzJKGSjo


2)To decrypt the above encrypted string use:

echo <> | openssl enc -aes-256-cbc -a -d -salt -pass pass:tecmint

[root@ranjith]# echo U2FsdGVkX1/lvI5yT7l7fPeg/thWbJN76DlM++FltEKqWUzJKGSjo | openssl enc -aes-256-cbc -a -d -salt -pass pass:tecmint
Ranjith


No comments:

Post a Comment

Selenium firefox driver session fails with : Could not start a new session. Response code 500. Message: Expected browser binary location, but unable to find binary in default location,

 Error: With Firefox driver /gecko driver Could not start a new session. Response code 500. Message: Expected browser binary location, but u...