This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.crypto.Cipher; | |
import java.security.*; | |
import java.security.spec.PKCS8EncodedKeySpec; | |
import java.security.spec.X509EncodedKeySpec; | |
import java.util.Base64; | |
/** | |
* @author Anass AIT BEN EL ARBI | |
* <ul> | |
* <li>AES/CBC/NoPadding (128)</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.sockets.simplified; | |
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.net.Socket; | |
import java.util.Scanner; | |
public class Client { | |
private Socket socket; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.sockets.simplified; | |
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.net.Socket; | |
import java.util.Scanner; | |
public class Client { | |
private Socket socket; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.crypto.Cipher; | |
import javax.crypto.KeyGenerator; | |
import javax.crypto.SecretKey; | |
import javax.crypto.spec.GCMParameterSpec; | |
import java.util.Base64; | |
/** | |
* Possible KEY_SIZE values are 128, 192 and 256 | |
* Possible T_LEN values are 128, 120, 112, 104 and 96 | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package myjava.sockets.filetransfert; | |
import java.io.BufferedInputStream; | |
import java.io.DataInputStream; | |
import java.io.DataOutputStream; | |
import java.io.IOException; | |
import java.net.Socket; | |
import java.net.UnknownHostException; | |
import java.util.Scanner; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.io.PrintWriter; | |
import java.net.Socket; | |
public class Client { | |
private Socket socket; | |
public void init() throws Exception{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.crypto.Cipher; | |
import javax.crypto.KeyGenerator; | |
import javax.crypto.SecretKey; | |
import javax.crypto.spec.IvParameterSpec; | |
/** | |
* DES/CBC/NoPadding (56) | |
* DES/CBC/PKCS5Padding (56) * | |
* DES/ECB/NoPadding (56) | |
* DES/ECB/PKCS5Padding (56) * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.crypto.Cipher; | |
import javax.crypto.KeyGenerator; | |
import javax.crypto.SecretKey; | |
import javax.crypto.spec.IvParameterSpec; | |
/** | |
* DES/CBC/NoPadding (56) | |
* DES/CBC/PKCS5Padding (56) * | |
* DES/ECB/NoPadding (56) | |
* DES/ECB/PKCS5Padding (56) * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends AppCompatActivity{ | |
protected ServiceMusique service; | |
private boolean connected; | |
private final ServiceConnection conn = new ServiceConnection() { | |
@Override | |
public void onServiceConnected(ComponentName componentName, IBinder iBinder) { | |
Toast.makeText(getApplicationContext(), "connected To service", Toast.LENGTH_SHORT).show(); | |
ServiceMusique.MyBinder binder = (ServiceMusique.MyBinder) iBinder; | |
service = binder.service; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns="http://maven.apache.org/POM/4.0.0" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.springframework.samples</groupId> | |
<artifactId>spring-petclinic</artifactId> | |
<version>2.5.0-SNAPSHOT</version> | |
<parent> |
NewerOlder