@Test public void testLongTextECSignShouldReturnNormalSignature() { StringBuilder longTextBuilder = new StringBuilder(); for (int i = 0; i < 100; i++) { longTextBuilder.append("imToken "); } String expectedSignature = "c72572b15a69e00ce8aa7193d74c2aab4ef926aded55ac3dda975cc43e114b645e3e9b36cc9316ca5a77854d5ee69de5ce5f978158f511d2fced57e000aba1771b"; String signature = EthereumSign.sign(longTextBuilder.toString(), privateKey); Assert.assertEquals(signature, expectedSignature); }
public static String sign(String data, byte[] prvKeyBytes) { return signMessage(dataToBytes(data), prvKeyBytes).toString(); }
EthereumSign { public static String sign(String data, byte[] prvKeyBytes) { return signMessage(dataToBytes(data), prvKeyBytes).toString(); } }
EthereumSign { public static String sign(String data, byte[] prvKeyBytes) { return signMessage(dataToBytes(data), prvKeyBytes).toString(); }  }
EthereumSign { public static String sign(String data, byte[] prvKeyBytes) { return signMessage(dataToBytes(data), prvKeyBytes).toString(); }  static String personalSign(String data, byte[] prvKeyBytes); static String sign(String data, byte[] prvKeyBytes); static BigInteger ecRecover(String data, String signature); static String recoverAddress(String data, String signature); static SignatureData signAsRecoverable(byte[] value, ECKey ecKey); }
EthereumSign { public static String sign(String data, byte[] prvKeyBytes) { return signMessage(dataToBytes(data), prvKeyBytes).toString(); }  static String personalSign(String data, byte[] prvKeyBytes); static String sign(String data, byte[] prvKeyBytes); static BigInteger ecRecover(String data, String signature); static String recoverAddress(String data, String signature); static SignatureData signAsRecoverable(byte[] value, ECKey ecKey);  }