Skip to content

Instantly share code, notes, and snippets.

View dfpalomar's full-sized avatar

Diego Palomar dfpalomar

View GitHub Profile
@dfpalomar
dfpalomar / introrx.md
Created February 24, 2020 10:30 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@dfpalomar
dfpalomar / CryptoBridge.swift
Last active December 19, 2020 01:34
Wrapper around swift framework to make it compatible with Kotlin MPP projects
@objc public class CryptoBridge: NSObject {
@objc public func generateKeyPair() -> BKeyPair {
let keyPair = RSA.generateKeyPair(keySize: RSA.KeySize.RSA2048)
return BKeyPair(
privateKey: (keyPair?.privateKey.dataRepresentation())!,
publicKey: (keyPair?.publicKey.dataRepresentation())!
)
}
package acme;
import com.yoti.mobile.android.connections.p2p.internal.exception.CryptoException;
import java.security.GeneralSecurityException;
import java.security.Key;
import java.security.KeyFactory;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
import java.security.PrivateKey;
@dfpalomar
dfpalomar / TagDescriptor.java
Last active March 28, 2017 10:30
TagDescriptor
/**
* This class describes the configuration of the Yoti Tag payload.
*/
@Getter
public class TagDescriptor {
private final Key piccMasterKey;
private final List<Application> applications;
@dfpalomar
dfpalomar / ApiClient
Last active October 18, 2015 02:41
ApiClient for multiple service
import com.jakewharton.u2020.data.api.GithubService;
import com.jakewharton.u2020.data.api.transforms.WeatherService;
import com.squareup.okhttp.OkHttpClient;
import retrofit.Retrofit;
public class ApiClient {
private static GithubService githubService;
private static WeatherService weatherService;