This post is by a banned member (TigerMate) - Unhide
OP 11 April, 2022 - 06:33 AM
Reply
Code:
Show ContentSpoiler:
Code:
[font=Courier New,Courier,monospace]import java.io.UnsupportedEncodingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.KeyGenerator;
import javax.crypto.SecretKey;
public class DesEncrypter { Cipher eCipher; Cipher dCipher;
DesEncrypter(SecretKey key) { try { eCipher = Cipher.getInstance("DES");
dCipher = Cipher.getInstance("DES");
eCipher.init(Cipher.ENCRYPT_MODE, key);
dCipher.init(Cipher.DECRYPT_MODE, key); } catch (javax.crypto.NoSuchPaddingException e)
{
} catch (java.security.NoSuchAlgorithmException e)
{
} catch (java.security.InvalidKeyException e)
{
} } public String encrypt(String str) { try { byte[] utf8 = str.getBytes("UTF8");
// Şifreleme byte[] enc = eCipher.doFinal(utf8);
// Bytes dizisini BASE64 ile karakter dizisine çevir return new sun.misc.BASE64Encoder().encode(enc); } catch (javax.crypto.BadPaddingException e)
{
} catch (IllegalBlockSizeException e)
{
} catch (UnsupportedEncodingException e)
{
} catch (java.io.IOException e)
{
} return null;
}
public String decrypt(String str)
{ try { byte[] dec = new sun.misc.BASE64Decoder().decodeBuffer(str);
// Şifreyi çözme byte[] utf8 = dCipher.doFinal(dec);
return new String(utf8, "UTF8");
} catch (javax.crypto.BadPaddingException e)
{
} catch (IllegalBlockSizeException e)
{
} catch (UnsupportedEncodingException e)
{
} catch (java.io.IOException e)
{
} return null; } public static **** main(String[] args) { try
{ // Geçici bir anahtar oluştur SecretKey key = KeyGenerator.getInstance("DES").generateKey();
// Şifreleyecek objeyi yarat DesEncrypter encrypter = new DesEncrypter(key);
// Şifrele String encrypted = encrypter.encrypt("E-Bergi Mart sayısı"); System.out.println(encrypted);
// Şifreyi çöz String decrypted = encrypter.decrypt(encrypted); System.out.println(decrypted); } catch (Exception e)
{
}
}
}[/font]
[/hide]
Please Like The Post & Give Me A +REP To Motivate Me To Post More Content.
Give Me LIKE & REP I Share My Knowledge With My Cracked.io Family
SPECIAl LOVE FOR DADDY @LUL
This post is by a banned member (talkcashplz) - Unhide
12 April, 2022 - 05:09 AM
Reply
(11 April, 2022 - 06:33 AM)TigerMate Wrote: Show More
sahaaa
This post is by a banned member (leqaja) - Unhide
24 April, 2022 - 02:16 PM
Reply
This post is by a banned member (minise7367) - Unhide
27 April, 2022 - 05:32 AM
Reply
This post is by a banned member (typical_name) - Unhide
06 May, 2022 - 03:50 PM
Reply
This post is by a banned member (Vorm) - Unhide
07 May, 2022 - 09:22 AM
Reply
(11 April, 2022 - 06:33 AM)TigerMate Wrote: Show More
[font][font]thx[/font][/font]
This post is by a banned member (KoVaNotSimper) - Unhide
15 May, 2022 - 05:37 PM
Reply
(11 April, 2022 - 06:33 AM)TigerMate Wrote: Show More
kk
This post is by a banned member (recipim688) - Unhide
16 May, 2022 - 05:42 AM
Reply