x25519_scalar_from_bytes

Function x25519_scalar_from_bytes 

Source
pub fn x25519_scalar_from_bytes(bytes: &[u8]) -> Result<Scalar, CryptoError>
Expand description

Creates X25519 secret scalar (also compatible with Ed25519 scalar) from the given bytes. This function ensures the value is pre-multiplied by the curve’s co-factor and already reduced mod 2^255-19.