sign method
Implementation
Future<String> sign(String detailsString) async {
String hash;
// var details = json.decode(detailsString);
// String decentralizedID = details['did'];
String path = (await getApplicationSupportDirectory()).path;
String pvtSharePath = '$path/Encrypted/Temp/PrivateShare.png';
hash = Dependencies().calculateHash(detailsString);
Future<String> firstPrivatebin = Dependencies().imageToBinary(pvtSharePath);
String firstPrivate = await firstPrivatebin;
List<int> privateIntegerArray = firstPrivate.split('').map(int.parse).toList();
var P = Dependencies().randomPositions("signer", hash, 32, privateIntegerArray);
List<int> finalPos = P["posForSign"];
List<int> p1Sign = Dependencies().getPrivatePosition(finalPos, privateIntegerArray);
return Dependencies().intArrayToStr(p1Sign);
}