Function fromBytes [src]

Create a public key from raw bytes.

Prototype

pub fn fromBytes(bytes: [encoded_length]u8) NonCanonicalError!PublicKey

Parameters

bytes: [encoded_length]u8

Possible Errors

NonCanonical NonCanonicalError

Source

pub fn fromBytes(bytes: [encoded_length]u8) NonCanonicalError!PublicKey { try Curve.rejectNonCanonical(bytes); return PublicKey{ .bytes = bytes }; }