Posts

Showing posts from June, 2021

Web Services by durgasoft

Image
 Session 1:(Introduction) Web Service is not an api it is a specification which contains rules for establishing communication between 2 interoperable applications Before web services we have:                    1.Socket Programming                    2.Remote Method Invocation(RMI)                    3.EJB(Enterprise Java Beans)                    4.CORBA(Common Object Request Broker Architecture) ATM example, If we want to withdraw money using SBI Atm card from ICICI Bank ATM, then customer details are valid or not and other information of sbi cusomer is checked by ICICI ATM  using web services. Session 2:(Web Services Architecture) Main Components of web services Architecture: 1.Skeleton(Pre defined class) 2.Wsdl generation ool(Pre defined class) 3.UDDI registry 4.Stub Generatio...

Encrypt the properties file key in selenium project

 Encrypt the properties file key in selenium project: Solution 1:(Very Basic Encryption) Refer this video : It Base64 Encrypion, which is very basic one. It uses Apache commen codecs utility Get the maven repository for the same, by clicking here Refer this video :  Code: Code for Encryption and decryption public static void setKey(String myKey) { MessageDigest sha = null; try { key = myKey.getBytes("UTF-8"); sha = MessageDigest.getInstance("SHA-1"); key = sha.digest(key); key = Arrays.copyOf(key, 16); secretKey = new SecretKeySpec(key, "AES"); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } catch (UnsupportedEncodingException e) { e.printStackTrace(); } } public static String encrypt(String strToEncrypt, String secret) { try { setKey(secret); ...