Ratq Sci-Tech

Ratq Sci-Tech

Share

Our objective is to nurture the innovative minds and ensure safety of those minds. Please go through

11/12/2022

Sample Code to encrypt and decrypt a text
------------------------------------------------------------------
package ecrypt.decrypt;
import java.security.spec.KeySpec;
import javax.crypto.Cipher;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.DESedeKeySpec;
import java.util.Base64.Encoder;
import java.util.Base64;
import java.util.Base64.Decoder;
import java.util.UUID;
public class TrippleDes {
private static final String UNICODE_FORMAT = "UTF8"; public static final String DESEDE_ENCRYPTION_SCHEME = "DESede"; private KeySpec ks; private SecretKeyFactory skf; private Cipher cipher; byte[] arrayBytes; private String myEncryptionKey; private String myEncryptionScheme; SecretKey key; //private static Encoder encoder; // private static Decoder decoder;
public TrippleDes() throws Exception { myEncryptionKey = "ThisIsSpartaThisIsSparta"; myEncryptionScheme = DESEDE_ENCRYPTION_SCHEME; arrayBytes = myEncryptionKey.getBytes(UNICODE_FORMAT); ks = new DESedeKeySpec(arrayBytes); skf = SecretKeyFactory.getInstance(myEncryptionScheme); cipher = Cipher.getInstance(myEncryptionScheme); key = skf.generateSecret(ks); }
public String encrypt(String unencryptedString) { String encryptedString = null; try { cipher.init(Cipher.ENCRYPT_MODE, key); byte[] plainText = unencryptedString.getBytes(UNICODE_FORMAT); byte[] encryptedText = cipher.doFinal(plainText); Encoder encoder =Base64.getEncoder() ; encryptedString = new String(encoder.encode(encryptedText)); } catch (Exception e) { e.printStackTrace(); } return encryptedString; }
public String decrypt(String encryptedString) { String decryptedText=null; try { cipher.init(Cipher.DECRYPT_MODE, key); Decoder decoder = Base64.getDecoder(); byte[] encryptedText = decoder.decode(encryptedString.getBytes()); byte[] plainText = cipher.doFinal(encryptedText); decryptedText= new String(plainText); } catch (Exception e) { e.printStackTrace(); } return decryptedText; }
public static void main(String args []) throws Exception { TrippleDes td= new TrippleDes();
String target="imparator"; String encrypted=td.encrypt(target); String decrypted=td.decrypt(encrypted);
System.out.println("String To Encrypt: "+ target); System.out.println("Encrypted String:" + encrypted); System.out.println("Decrypted String:" + decrypted);
}
}

07/09/2022

Learn Space Science and Astronomy. Online space program for Kids of age 6+ yrs. For information visit: https://www.sdro.in/spaceforkids.

✅ Live and Interactive Classes.
✅ Learn about Galaxies, Stars, Constellations, Black Holes, Time Travel, Aliens, Big Bang, and more.
✅ Join the class with one click on your laptop, desktop, mobile, or tablet.
✅ Join the community of space kids.
✅ Instant Certification Available
✅ Get FREE study material.
✅ After every class, a recording will be available for students.

Happy Learning!

29/07/2022

That's how PLM can use social media..

28/07/2022

Cybersecurity Topic: Smishing = SMS + Phishing



Smishing is a cyber-attack using misleading text messages to your mobile device, tricking you to respond or act. For many of us, text messages feel more legitimate than the typical email. Smishing attacks may be harder to detect than phishing since there is less information and fewer clues for us to pick up on that something is wrong or suspicious. When you receive a text message that seems odd, start by asking yourself does this message make sense, and why am I receiving it?



Here are some of the most common clues of an attack:

A tremendous sense of urgency,
Message is asking for personal information, passwords or other sensitive information
Message sounds too good to be true? No you did not win the lottery, especially the one you never entered😊
Message appears to come from a co-worker or friend’s phone number, but the wording does not sound like them. Their phone number may have been spoofed by an attacker.


Here are some examples of attacks:

You get a message that urges you to “check out” a video or picture (“you won’t believe this!”). If the message looks like it is from someone you know, call the person on the phone to verify before you act.
You get a message from an official organization (e.g. bank, tax authority) that alarms you, Check with them directly by visiting their website or calling them directly using the phone number found on their website. Do not use the number in the message. Bear in mind that most government agencies, such as tax or law enforcement agencies, won’t contact you via text message.
Email and messaging attacks can be combined. Gift card scams can work this way. First you get an urgent email pretending to be a friend or co-worker, asking for your cell phone number. Then you receive repeated text messages, pressuring you to purchase gift cards. Once purchased, the attackers have you scratch off the code on the back of the cards and message a picture of the codes back to them.


When it comes to messaging attacks, you are your own best defense!

25/07/2022

While Industry 4.0 was more focused on automation , Industry 5.0 will through lights on human skill and efficiency ,social well being...

25/07/2022

The concept of Industry 5.0 is more sustainable and more human centric...

09/04/2022

A Pi clock ...

01/01/2022

Happy New Year...

Want your school to be the top-listed School/college in KOLKATA?

Click here to claim your Sponsored Listing.

Location

Telephone

Address


Kolkata

Opening Hours

Monday 9am - 5pm
Tuesday 9am - 5pm
Wednesday 9am - 7pm
Thursday 9am - 7pm
Friday 9am - 7pm
Saturday 9am - 3pm