use of com.quorum.tessera.encryption.KeyPair in project tessera by ConsenSys.
the class ConfigGenerator method keyLookup.
private static Map<Integer, SortedMap<String, String>> keyLookup(EncryptorType encryptorType) {
final Encryptor encryptor = transaction.utils.Utils.getEncryptor(encryptorType);
return new HashMap<Integer, SortedMap<String, String>>() {
{
put(1, new TreeMap<String, String>() {
KeyPair pair = encryptor.generateNewKeys();
{
put(pair.getPublicKey().encodeToBase64(), pair.getPrivateKey().encodeToBase64());
}
});
put(2, new TreeMap<String, String>() {
KeyPair pair = encryptor.generateNewKeys();
{
put(pair.getPublicKey().encodeToBase64(), pair.getPrivateKey().encodeToBase64());
}
});
put(3, new TreeMap<String, String>() {
KeyPair pair = encryptor.generateNewKeys();
KeyPair pair2 = encryptor.generateNewKeys();
{
put(pair.getPublicKey().encodeToBase64(), pair.getPrivateKey().encodeToBase64());
put(pair2.getPublicKey().encodeToBase64(), pair2.getPrivateKey().encodeToBase64());
}
});
put(4, new TreeMap<String, String>() {
KeyPair pair = encryptor.generateNewKeys();
{
put(pair.getPublicKey().encodeToBase64(), pair.getPrivateKey().encodeToBase64());
}
});
}
};
}
Aggregations