ToBytes method

void ToBytes(
  1. Uint8List s
)

Implementation

void ToBytes(Uint8List s) {
  var recip = FieldElement();
  var x = FieldElement();
  var y = FieldElement();

  FeInvert(recip, Z);
  FeMul(x, X, recip);
  FeMul(y, Y, recip);
  FeToBytes(s, y);
  s[31] ^= FeIsNegative(x) << 7;
}