Use Case: In Curl command most of the time you have to enter user credentials to perform CRUD operation. Some people might have security concern sharing admin password with other users.
Solution: You can use following java program to create encrypted password that you can use in curl command
import java.io.UnsupportedEncodingException;
public class Test {
public static void main(String[] args) {
String password = "admin";
try {
for (byte x : password.getBytes("UTF-8")) {
System.out.print("%" + Integer.toHexString((x & 255) + 256).substring(1));
}
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
1) Create Test.java
2) Copy paste above code
3) Run program by changing password value (Or pass it through command line arg)
4) Use output of program to use it in CURL
Special thanks to Thomas Mueller From Adobe for providing this information.
It works only in java program , I was looking a solution to get worked in simple linux curl or curl with perl.
ReplyDelete--
Sun
This obfuscates the password, it does not encrypt it.
ReplyDeleteThanks for comment. Yes you are right. For custom password usage you can use Crypto support in CQ5.5. Above example is just intended for internal IT use in case you don't want to share password.
DeleteThis is an incredible rousing article.I am basically satisfied with your great work.You put truly exceptionally accommodating data... Tech website
ReplyDeleteThanks for the information, I have bookmarked your blog and will share this on social media. Check here for mosquitron review
ReplyDeleteecoheat s review
You are writing some interesting and best content I also bookmark this URL .You guys are writing some Amazing tips. Thanks for sharing this. Totally Awesome Post Please Keep Posting Regularly.
ReplyDeleteechobeat earbuds review
chargeboost reviews
liporing review
doc socks
livewave antenna review
livewave antenna