Skip to content

Instantly share code, notes, and snippets.

View nicoruti's full-sized avatar

Nico Rutishauser nicoruti

View GitHub Profile
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.Signature;
import javax.crypto.Cipher;
public class SignatureTest {
public static void main(String[] args) throws Exception {
/**
import java.io.File;
import org.hive2hive.core.api.H2HNode;
import org.hive2hive.core.api.configs.FileConfiguration;
import org.hive2hive.core.api.configs.NetworkConfiguration;
import org.hive2hive.core.api.interfaces.IH2HNode;
import org.hive2hive.core.api.interfaces.INetworkConfiguration;
import org.hive2hive.core.security.UserCredentials;
public class DemoCode {
@nicoruti
nicoruti / gist:996995dacb97990d6db8
Created January 31, 2015 23:38
FST Serialize BouncyCastle Keypair
import java.math.BigInteger;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.SecureRandom;
import java.security.Security;
import java.security.spec.RSAKeyGenParameterSpec;
import org.bouncycastle.jce.provider.BouncyCastleProvider;
import org.nustaq.serialization.FSTConfiguration;