Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Development #984

Merged
merged 73 commits into from
Oct 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
4797238
Add comments for support of hash of payment account
ManfredKarrer Sep 18, 2017
af27682
Merge Development
ManfredKarrer Sep 21, 2017
fcd3106
Remove comment
ManfredKarrer Sep 21, 2017
007142e
Add AgeWittness domain (WIP)
ManfredKarrer Sep 23, 2017
6d1a40d
Merge branch 'Development' into PaymentAccountAgeVerification
ManfredKarrer Sep 23, 2017
4ef8309
Add TakerVerifyOffersAgeWitnessHash to taker protocols
ManfredKarrer Sep 25, 2017
8c7e1fd
Add verification methods, add hash to offer, add salt to trde process…
ManfredKarrer Sep 25, 2017
ea1666a
Rename getPayload to createPayload in PaymentAccount
ManfredKarrer Sep 25, 2017
fb5b8ec
Rename PaymentAccountAgeWitness to AccountAgeWitness
ManfredKarrer Sep 25, 2017
b667e1b
Rename PaymentAccountAgeWitnessService to AccountAgeWitnessService
ManfredKarrer Sep 25, 2017
d349acb
Fix comments
ManfredKarrer Sep 25, 2017
791c16a
Add module consensus
ManfredKarrer Sep 25, 2017
091e766
Add RestrictedByContractJson interface
ManfredKarrer Sep 25, 2017
6274b64
Move salt from PaymentAccount to PaymentAccountPayload
ManfredKarrer Sep 25, 2017
94e2c1b
Remove dev value for accountSalt
ManfredKarrer Sep 25, 2017
68badcb
Change name of IOP to Internet Of People
ManfredKarrer Sep 25, 2017
5d960dd
Change comments
ManfredKarrer Sep 25, 2017
952c0d0
Add accountSalt to tradingPeer
ManfredKarrer Sep 25, 2017
efcc7ff
Remove accountSalt from trade messages and TradePeer
ManfredKarrer Sep 25, 2017
6de0355
Add AccountAgeWitness to PB
ManfredKarrer Sep 25, 2017
175c1e4
Add AccountAgeWitnessMap to PB (WIP)
ManfredKarrer Oct 6, 2017
130c9bd
Merge branch 'Development' into PaymentAccountAgeVerification
ManfredKarrer Oct 9, 2017
27ecbf7
Publish accountAgeWitness data to P2P network (WIP)
ManfredKarrer Oct 10, 2017
302db19
Add missing param at log
ManfredKarrer Oct 12, 2017
5dbcd7d
Merge remote-tracking branch 'upstream/master'
ManfredKarrer Oct 12, 2017
5f93db8
Merge remote-tracking branch 'upstream/master'
ManfredKarrer Oct 13, 2017
5e8c831
Merge branch 'Development' into PaymentAccountAgeVerification
ManfredKarrer Oct 13, 2017
5adda7b
Merge branch 'Development' into PaymentAccountAgeVerification
ManfredKarrer Oct 13, 2017
7c12236
Show account age in peer info icon
ManfredKarrer Oct 13, 2017
b1a45f5
Show account age and categroy in PeerIcon
ManfredKarrer Oct 14, 2017
054b746
Reduce trade limits
ManfredKarrer Oct 14, 2017
cb50fac
Apply age based trade limit to offer
ManfredKarrer Oct 14, 2017
a3ab418
Filter offer by account age withness age (WIP)
ManfredKarrer Oct 14, 2017
bd74d03
Use Ripemd with sha256 hash to reduce size of witness hash to 20 bytes
ManfredKarrer Oct 15, 2017
fe38f3a
Rename Hash.getHash to Hash.getSha256Hash
ManfredKarrer Oct 15, 2017
6d986c6
Refactoring: Rename getProtectedData to getProtectedStorageEntry
ManfredKarrer Oct 15, 2017
9c47831
Refactoring: Rename StoragePayload to ProtectedStoragePayload
ManfredKarrer Oct 15, 2017
cee522e
Refactoring: Change base interface of PersistedStoragePayload
ManfredKarrer Oct 15, 2017
679f3bb
Refactoring: Rename PersistedStoragePayload to PersistableNetworkPayload
ManfredKarrer Oct 15, 2017
6056912
Refactoring: Remove base interface PersistablePayload from ExpirableP…
ManfredKarrer Oct 15, 2017
5d6d457
Refactoring: Rename PersistedEntryMap to PersistableEntryMap
ManfredKarrer Oct 15, 2017
0f322ad
Add PB support for excludeFromJsonDataMap to all PaymentPayload classes
ManfredKarrer Oct 15, 2017
851792d
Add new P2P network data structure for AccountAgeWitness without pubKey
ManfredKarrer Oct 16, 2017
654270e
Add maxTradeLimit to BtcValidator
ManfredKarrer Oct 16, 2017
f6c0d02
Refactor: Rename addAllowedPeriod to addLimitations
ManfredKarrer Oct 16, 2017
b60579f
Add account age to payment method forms
ManfredKarrer Oct 16, 2017
5f9d591
Add salt field to payment method forms
ManfredKarrer Oct 16, 2017
4c2f06f
Prevent that a dev arbitrator can be published on Mainnet
ManfredKarrer Oct 17, 2017
1206878
Add peers account age witness verifications in trade process
ManfredKarrer Oct 18, 2017
a5533b9
Add check to only add AccountAgeWitness if it is not older than 1 day.
ManfredKarrer Oct 18, 2017
b750727
Derive nonce from peers data input
ManfredKarrer Oct 18, 2017
e4060a8
Merge remote-tracking branch 'upstream/master'
ManfredKarrer Oct 20, 2017
085f6b3
Merge branch 'Development' into PaymentAccountAgeVerification
ManfredKarrer Oct 20, 2017
96fe221
Fix path in build.md
ManfredKarrer Oct 21, 2017
a33923c
Add missing linebreak
ManfredKarrer Oct 21, 2017
e56fc44
Only use accumulated hash in Witness object
ManfredKarrer Oct 21, 2017
db40ae1
Re-publish witness data at startup
ManfredKarrer Oct 21, 2017
df8ed79
Set extraMap to null with altcoins
ManfredKarrer Oct 22, 2017
801a917
Dont publish altcoin account witness
ManfredKarrer Oct 22, 2017
7c78db5
Apply account age limit in take offer screen
ManfredKarrer Oct 22, 2017
14bb75d
Check accountWitness date only if we receive it from other peers in t…
ManfredKarrer Oct 22, 2017
6520010
Add check for size of hash
ManfredKarrer Oct 22, 2017
3a50f99
User max trade limit from offer not the takers local one for the witn…
ManfredKarrer Oct 22, 2017
611428f
Use peers currnet date for witness age calculation
ManfredKarrer Oct 23, 2017
fe4514b
Remove PublishAccountAgeWitness task
ManfredKarrer Oct 23, 2017
f2d1e8b
Remove signature from hash
ManfredKarrer Oct 23, 2017
75e95ae
Use peers witness not the one from the offer for verification call
ManfredKarrer Oct 23, 2017
e859d0d
Fix wrong data check
ManfredKarrer Oct 23, 2017
c3ba1bf
Merge remote-tracking branch 'upstream/master'
ManfredKarrer Oct 25, 2017
963fec4
Merge branch 'master' into Development
ManfredKarrer Oct 25, 2017
e8290e3
Fix missing verifications, handle altcoins, cleanup
ManfredKarrer Oct 25, 2017
49e38a6
Fix format
ManfredKarrer Oct 25, 2017
6945383
Merge branch 'Development' into PaymentAccountAgeVerification
ManfredKarrer Oct 25, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,11 @@
</build>

<dependencies>
<dependency>
<groupId>io.bisq</groupId>
<artifactId>consensus</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
Expand Down
4 changes: 2 additions & 2 deletions common/src/main/java/io/bisq/common/app/DevEnv.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ public class DevEnv {
// peer (click user icon and alt+r), filter/block offers by various data like offer ID (cmd + f).
// The user can set a program argument to ignore all of those privileged network_messages. They are intended for
// emergency cases only (beside update message and arbitrator registration).
public static final boolean USE_DEV_PRIVILEGE_KEYS = false;
public static final boolean USE_DEV_PRIVILEGE_KEYS = true;
public static final String DEV_PRIVILEGE_PUB_KEY = "027a381b5333a56e1cc3d90d3a7d07f26509adf7029ed06fc997c656621f8da1ee";
public static final String DEV_PRIVILEGE_PRIV_KEY = "6ac43ea1df2a290c1c8391736aa42e4339c5cb4f110ff0257a13b63211977b7a";


// If set to true we ignore several UI behavior like confirmation popups as well dummy accounts are created and
// offers are filled with default values. Intended to make dev testing faster.
@SuppressWarnings("PointlessBooleanExpression")
public static final boolean DEV_MODE = STRESS_TEST_MODE || false;
public static final boolean DEV_MODE = STRESS_TEST_MODE || true;

public static final boolean DAO_PHASE2_ACTIVATED = false;
}
7 changes: 7 additions & 0 deletions common/src/main/java/io/bisq/common/crypto/CryptoUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import lombok.extern.slf4j.Slf4j;

import java.security.PublicKey;
import java.security.SecureRandom;
import java.security.spec.X509EncodedKeySpec;
import java.util.Base64;

Expand All @@ -29,5 +30,11 @@ public static String pubKeyToString(PublicKey publicKey) {
final X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(publicKey.getEncoded());
return Base64.getEncoder().encodeToString(x509EncodedKeySpec.getEncoded());
}

public static byte[] getRandomBytes(int size) {
byte[] bytes = new byte[size];
new SecureRandom().nextBytes(bytes);
return bytes;
}
}

30 changes: 14 additions & 16 deletions common/src/main/java/io/bisq/common/crypto/Hash.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,29 +18,28 @@
package io.bisq.common.crypto;

import com.google.common.base.Charsets;
import org.bouncycastle.util.encoders.Hex;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import lombok.extern.slf4j.Slf4j;
import org.bitcoinj.core.Utils;

import java.nio.ByteBuffer;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;

@Slf4j
public class Hash {
private static final Logger log = LoggerFactory.getLogger(Hash.class);

/**
* @param data Data as byte array
* @return Hash of data
*/
public static byte[] getHash(byte[] data) {
public static byte[] getSha256Hash(byte[] data) {
try {
MessageDigest digest = MessageDigest.getInstance("SHA-256", "BC");
digest.update(data, 0, data.length);
return digest.digest();
} catch (NoSuchAlgorithmException | NoSuchProviderException e) {
log.error("Could not create MessageDigest for hash. " + e.getMessage());
log.error("Could not create MessageDigest for hash. " + e.toString());
e.printStackTrace();
throw new RuntimeException(e);
}
Expand All @@ -50,24 +49,23 @@ public static byte[] getHash(byte[] data) {
* @param message UTF-8 encoded message
* @return Hash of data
*/
public static byte[] getHash(String message) {
return getHash(message.getBytes(Charsets.UTF_8));
public static byte[] getSha256Hash(String message) {
return getSha256Hash(message.getBytes(Charsets.UTF_8));
}

/**
* @param message UTF-8 encoded message
* @return Hex string of hash of data
* @param data data as Integer
* @return Hash of data
*/
public static String getHashAsHex(String message) {
return Hex.toHexString(message.getBytes(Charsets.UTF_8));
public static byte[] getSha256Hash(Integer data) {
return getSha256Hash(ByteBuffer.allocate(4).putInt(data).array());
}

/**
* @param data data as Integer
* @return Hash of data
* Calculates RIPEMD160(SHA256(input)).
*/
public static byte[] getHash(Integer data) {
return getHash(ByteBuffer.allocate(4).putInt(data).array());
public static byte[] getSha256Ripemd160hash(byte[] data) {
return Utils.sha256hash160(data);
}

}
Expand Down
3 changes: 2 additions & 1 deletion common/src/main/java/io/bisq/common/crypto/PubKeyRing.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.google.protobuf.ByteString;
import io.bisq.common.proto.network.NetworkPayload;
import io.bisq.common.util.Utilities;
import io.bisq.consensus.RestrictedByContractJson;
import io.bisq.generated.protobuffer.PB;
import lombok.EqualsAndHashCode;
import lombok.Getter;
Expand All @@ -36,7 +37,7 @@
@Slf4j
@EqualsAndHashCode
@Getter
public final class PubKeyRing implements NetworkPayload {
public final class PubKeyRing implements NetworkPayload, RestrictedByContractJson {
private final byte[] signaturePubKeyBytes;
private final byte[] encryptionPubKeyBytes;
@Nullable
Expand Down
4 changes: 2 additions & 2 deletions common/src/main/java/io/bisq/common/locale/CurrencyUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static List<CryptoCurrency> createAllSortedCryptoCurrenciesList() {
result.add(new CryptoCurrency("DNET", "DarkNet"));
if (!baseCurrencyCode.equals("DASH"))
result.add(new CryptoCurrency("DASH", "Dash"));
result.add(new CryptoCurrency("DEC", "DECENT"));
result.add(new CryptoCurrency("DCT", "DECENT"));
result.add(new CryptoCurrency("DCR", "Decred"));
if (!baseCurrencyCode.equals("DOGE"))
result.add(new CryptoCurrency("DOGE", "Dogecoin"));
Expand Down Expand Up @@ -248,7 +248,7 @@ public static Optional<TradeCurrency> getTradeCurrency(String currencyCode) {
if (isCryptoCurrency(currencyCode) && cryptoCurrencyOptional.isPresent()) {
return Optional.of(cryptoCurrencyOptional.get());
} else {
return Optional.empty();
return Optional.<TradeCurrency>empty();
}
}
}
Expand Down
3 changes: 3 additions & 0 deletions common/src/main/java/io/bisq/common/proto/ProtoResolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@
package io.bisq.common.proto;

import io.bisq.common.Payload;
import io.bisq.common.proto.persistable.PersistableEnvelope;
import io.bisq.generated.protobuffer.PB;

public interface ProtoResolver {
Payload fromProto(PB.PaymentAccountPayload proto);

PersistableEnvelope fromProto(PB.PersistableNetworkPayload proto);
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,27 @@
import lombok.experimental.Delegate;

import java.util.HashMap;
import java.util.Map;
import java.util.function.Function;

public class PersistableHashMap<K extends PersistablePayload, V extends PersistablePayload> implements PersistableEnvelope {
public class PersistableHashMap<K, V extends PersistablePayload> implements PersistableEnvelope {
@Delegate
@Getter
private HashMap<K, V> hashMap = new HashMap<>();
private Map<K, V> map = new HashMap<>();
@Setter
private Function<HashMap<K, V>, Message> toProto;
private Function<Map<K, V>, Message> toProto;

public PersistableHashMap(HashMap<K, V> hashMap) {
this.hashMap = hashMap;
public PersistableHashMap(Map<K, V> map) {
this.map = map;
}

public PersistableHashMap(HashMap<K, V> hashMap, Function<HashMap<K, V>, Message> toProto) {
this(hashMap);
public PersistableHashMap(Map<K, V> map, Function<Map<K, V>, Message> toProto) {
this(map);
this.toProto = toProto;
}

@Override
public Message toProtoMessage() {
return toProto.apply(hashMap);
return toProto.apply(map);
}
}
80 changes: 50 additions & 30 deletions common/src/main/java/io/bisq/common/util/Utilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import io.bisq.common.crypto.LimitedKeyStrengthException;
import javafx.scene.input.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ArrayUtils;
import org.apache.commons.lang3.RandomStringUtils;
import org.apache.commons.lang3.StringUtils;
import org.bitcoinj.core.Utils;
Expand All @@ -37,10 +38,7 @@
import java.security.NoSuchAlgorithmException;
import java.security.Permission;
import java.security.PermissionCollection;
import java.util.Collection;
import java.util.Locale;
import java.util.Map;
import java.util.Random;
import java.util.*;
import java.util.concurrent.*;
import java.util.stream.Collectors;

Expand All @@ -56,11 +54,11 @@ public class Utilities {
// TODO check out Jackson lib
public static String objectToJson(Object object) {
Gson gson = new GsonBuilder()
.setExclusionStrategies(new AnnotationExclusionStrategy())
.setExclusionStrategies(new AnnotationExclusionStrategy())
/*.excludeFieldsWithModifiers(Modifier.TRANSIENT)*/
/* .setFieldNamingPolicy(FieldNamingPolicy.UPPER_CAMEL_CASE)*/
.setPrettyPrinting()
.create();
.setPrettyPrinting()
.create();
return gson.toJson(object);
}

Expand All @@ -76,11 +74,11 @@ public static ThreadPoolExecutor getThreadPoolExecutor(String name,
int maximumPoolSize,
long keepAliveTimeInSec) {
final ThreadFactory threadFactory = new ThreadFactoryBuilder()
.setNameFormat(name)
.setDaemon(true)
.build();
.setNameFormat(name)
.setDaemon(true)
.build();
ThreadPoolExecutor executor = new ThreadPoolExecutor(corePoolSize, maximumPoolSize, keepAliveTimeInSec,
TimeUnit.SECONDS, new ArrayBlockingQueue<>(maximumPoolSize), threadFactory);
TimeUnit.SECONDS, new ArrayBlockingQueue<>(maximumPoolSize), threadFactory);
executor.allowCoreThreadTimeOut(true);
executor.setRejectedExecutionHandler((r, e) -> log.debug("RejectedExecutionHandler called"));
return executor;
Expand All @@ -93,10 +91,10 @@ public static ScheduledThreadPoolExecutor getScheduledThreadPoolExecutor(String
int maximumPoolSize,
long keepAliveTimeInSec) {
final ThreadFactory threadFactory = new ThreadFactoryBuilder()
.setNameFormat(name)
.setDaemon(true)
.setPriority(Thread.MIN_PRIORITY)
.build();
.setNameFormat(name)
.setDaemon(true)
.setPriority(Thread.MIN_PRIORITY)
.build();
ScheduledThreadPoolExecutor executor = new ScheduledThreadPoolExecutor(corePoolSize, threadFactory);
executor.setKeepAliveTime(keepAliveTimeInSec, TimeUnit.SECONDS);
executor.allowCoreThreadTimeOut(true);
Expand Down Expand Up @@ -134,8 +132,8 @@ public static String getOSArchitecture() {
String arch = System.getenv("PROCESSOR_ARCHITECTURE");
String wow64Arch = System.getenv("PROCESSOR_ARCHITEW6432");
return arch.endsWith("64")
|| wow64Arch != null && wow64Arch.endsWith("64")
? "64" : "32";
|| wow64Arch != null && wow64Arch.endsWith("64")
? "64" : "32";
} else if (osArch.contains("arm")) {
// armv8 is 64 bit, armv7l is 32 bit
return osArch.contains("64") || osArch.contains("v8") ? "64" : "32";
Expand All @@ -148,12 +146,12 @@ public static String getOSArchitecture() {

public static void printSysInfo() {
log.info("System info: os.name={}; os.version={}; os.arch={}; sun.arch.data.model={}; JRE={}; JVM={}",
System.getProperty("os.name"),
System.getProperty("os.version"),
System.getProperty("os.arch"),
getJVMArchitecture(),
(System.getProperty("java.runtime.version", "-") + " (" + System.getProperty("java.vendor", "-") + ")"),
(System.getProperty("java.vm.version", "-") + " (" + System.getProperty("java.vm.name", "-") + ")")
System.getProperty("os.name"),
System.getProperty("os.version"),
System.getProperty("os.arch"),
getJVMArchitecture(),
(System.getProperty("java.runtime.version", "-") + " (" + System.getProperty("java.vendor", "-") + ")"),
(System.getProperty("java.vm.version", "-") + " (" + System.getProperty("java.vm.name", "-") + ")")
);
}

Expand All @@ -175,8 +173,8 @@ public static boolean isCorrectOSArchitecture() {

public static void openURI(URI uri) throws IOException {
if (!isLinux()
&& isDesktopSupported()
&& getDesktop().isSupported(Action.BROWSE)) {
&& isDesktopSupported()
&& getDesktop().isSupported(Action.BROWSE)) {
getDesktop().browse(uri);
} else {
// Maybe Application.HostServices works in those cases?
Expand All @@ -192,8 +190,8 @@ && getDesktop().isSupported(Action.BROWSE)) {

public static void openFile(File file) throws IOException {
if (!isLinux()
&& isDesktopSupported()
&& getDesktop().isSupported(Action.OPEN)) {
&& isDesktopSupported()
&& getDesktop().isSupported(Action.OPEN)) {
getDesktop().open(file);
} else {
// Maybe Application.HostServices works in those cases?
Expand Down Expand Up @@ -258,7 +256,7 @@ public static byte[] concatByteArrays(byte[]... arrays) {

public static <T> T jsonToObject(String jsonString, Class<T> classOfT) {
Gson gson =
new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.UPPER_CAMEL_CASE).setPrettyPrinting().create();
new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.UPPER_CAMEL_CASE).setPrettyPrinting().create();
return gson.fromJson(jsonString, classOfT);
}

Expand Down Expand Up @@ -372,13 +370,35 @@ public static boolean isAltOrCtrlPressed(KeyCode keyCode, KeyEvent keyEvent) {

public static boolean isCtrlPressed(KeyCode keyCode, KeyEvent keyEvent) {
return new KeyCodeCombination(keyCode, KeyCombination.SHORTCUT_DOWN).match(keyEvent) ||
new KeyCodeCombination(keyCode, KeyCombination.CONTROL_DOWN).match(keyEvent);
new KeyCodeCombination(keyCode, KeyCombination.CONTROL_DOWN).match(keyEvent);
}

public static boolean isAltPressed(KeyCode keyCode, KeyEvent keyEvent) {
return new KeyCodeCombination(keyCode, KeyCombination.ALT_DOWN).match(keyEvent);
}

public static byte[] concatenateByteArrays(byte[] array1, byte[] array2) {
return ArrayUtils.addAll(array1, array2);
}

public static byte[] concatenateByteArrays(byte[] array1, byte[] array2, byte[] array3) {
return ArrayUtils.addAll(array1, ArrayUtils.addAll(array2, array3));
}

public static byte[] concatenateByteArrays(byte[] array1, byte[] array2, byte[] array3, byte[] array4) {
return ArrayUtils.addAll(array1, ArrayUtils.addAll(array2, ArrayUtils.addAll(array3, array4)));
}

public static byte[] concatenateByteArrays(byte[] array1, byte[] array2, byte[] array3, byte[] array4, byte[] array5) {
return ArrayUtils.addAll(array1, ArrayUtils.addAll(array2, ArrayUtils.addAll(array3, ArrayUtils.addAll(array4, array5))));
}

public static Date getUTCDate(int year, int month, int dayOfMonth) {
GregorianCalendar calendar = new GregorianCalendar(year, month, dayOfMonth);
calendar.setTimeZone(TimeZone.getTimeZone("UTC"));
return calendar.getTime();
}

private static class AnnotationExclusionStrategy implements ExclusionStrategy {
@Override
public boolean shouldSkipField(FieldAttributes f) {
Expand Down Expand Up @@ -503,6 +523,6 @@ public static boolean isRestrictedCryptography() {
final String name = System.getProperty("java.runtime.name");
final String ver = System.getProperty("java.version");
return name != null && name.equals("Java(TM) SE Runtime Environment")
&& ver != null && (ver.startsWith("1.7") || ver.startsWith("1.8"));
&& ver != null && (ver.startsWith("1.7") || ver.startsWith("1.8"));
}
}
Loading