src/main/StringUtil.java
public static byte[] applyECDSASig(PrivateKey privateKey, String input) {
		Signature ecdsa;
		byte[] output = new byte[0];
		try {
			ecdsa = Signature.getInstance("SHA256withECDSA");
			ecdsa.initSign(privateKey);
			byte[] strByte = input.getBytes();
			ecdsa.update(strByte);
			byte[] realSig = ecdsa.sign();
			output = realSig;
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
		return output;
	}
// Generates the signature for a transaction by applying ECDSA to an input
Generates the signature for a transaction by applying ECDSA to an input
Generates the signature for a transaction by applying ECDSA to an input
public static byte[] applyECDSASig(PrivateKey privateKey, String input) {
		Signature ecdsa;
		byte[] output = new byte[0];
		try {
			ecdsa = Signature.getInstance("SHA256withECDSA");
			ecdsa.initSign(privateKey);
			byte[] strByte = input.getBytes();
			ecdsa.update(strByte);
			byte[] realSig = ecdsa.sign();
			output = realSig;
		} catch (Exception e) {
			throw new RuntimeException(e);
		}
		return output;
	}
public static byte [ ] applyECDSASig ( PrivateKey privateKey , String input ) { Signature ecdsa ; byte [ ] output = new byte [ 0 ] ; try { ecdsa = Signature . getInstance ( "SHA256withECDSA" ) ; ecdsa . initSign ( privateKey ) ; byte [ ] strByte = input . getBytes ( ) ; ecdsa . update ( strByte ) ; byte [ ] realSig = ecdsa . sign ( ) ; output = realSig ; } catch ( Exception e ) { throw new RuntimeException ( e ) ; } return output ; }
Generates the signature for a transaction by applying ECDSA to an input
Generates the signature for a transaction by applying ECDSA to an input