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.
DeleteThank you very much for this article.
ReplyDeleteMovers and Packers in Pune
Movers and Packers in Gurgaon
Movers and Packers in Bangalore
Thank you very much for this article
ReplyDeletePackers and Movers Mumbai
Packers and Movers Navi Mumbai
Packers and Movers Thane
Packers and Movers Ghaziabad
Packers and Movers Faridabad
Packers and Movers Delhi
Packers and Movers Noida
This is an incredible rousing article.I am basically satisfied with your great work.You put truly exceptionally accommodating data... Tech website
ReplyDeleteThis Website is great for group chat and conversation. Thanks for sharing with us. like this website so much it's really awesome.I have also gone through your other posts too and they are also very much appreciate able and I'm just waiting for your next update to come as I like all your posts.
ReplyDeleteCopa America 2019 fixture
Top 10 Gadgets Review
EcoHeat S Review
Mosquitron Review
ThePhotoStick Review
DroneX Pro Review
Thanks 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
Thanks for sharing your thoughts, this blog is great. Use Full Links.
ReplyDeleteEcoheat S Review
Mosquitonix Band Review
Wifi UltraBoost Review