Function toBytes [src]

Encode an Edwards25519 point.

Prototype

pub fn toBytes(p: Edwards25519) [encoded_length]u8

Parameters

p: Edwards25519

Source

pub fn toBytes(p: Edwards25519) [encoded_length]u8 { const zi = p.z.invert(); var s = p.y.mul(zi).toBytes(); s[31] ^= @as(u8, @intFromBool(p.x.mul(zi).isNegative())) << 7; return s; }