signPoseidon method

String signPoseidon(
  1. String privateKey,
  2. String msg
)

Implementation

String signPoseidon(String privateKey, String msg) {
  //if (lib == null) return "ERROR: The library is not initialized";
  final prvKeyPtr = privateKey.toNativeUtf8();
  final msgPtr = msg.toNativeUtf8();
  final resultPtr = _signPoseidon(prvKeyPtr, msgPtr);
  final String compressedSignature = resultPtr.toDartString();
  //print("- Response string:  $compressedSignature");
  // Free the string pointer, as we already have
  // an owned String to return
  //print("- Freeing the native char*");
  cstringFree(resultPtr);
  return compressedSignature;
}