Skip to content

Instantly share code, notes, and snippets.

@elevenetc
elevenetc / SymmetricAndAsymmetricEncryption.java
Created May 5, 2016 21:01
Symmetric and asymmetric encryption
//Symmetric and asymmetric encription
//http://www.developer.com/ws/android/encrypting-with-android-cryptography-api.html
public class SymmetricAlgorithmAES extends Activity {
static final String TAG = "SymmetricAlgorithmAES";
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
@elevenetc
elevenetc / ReflectionUtils.kt
Created May 4, 2020 17:42
Utils to get implementation classes of an interface
/**
* Kotlin version of https://dzone.com/articles/get-all-classes-within-package
* Mentioned here as well: https://stackoverflow.com/a/520344/798165
*/
object ReflectionUtils {
/**
* Returns list of classes if interface is located in the same package with implementations
*/
@Suppress("UNCHECKED_CAST")