# hashToCurve

> For the complete documentation index, see [llms.txt](https://docs.midnight.network/llms.txt)

[**@midnight/ledger v8.1.3**](https://docs.midnight.network/api-reference/ledger.md)

***

[@midnight/ledger](https://docs.midnight.network/api-reference/ledger/globals.md) / hashToCurve

# Function: hashToCurve()

```
function hashToCurve(align, val): Value;
```

**`Internal`**

Internal implementation of the hash to curve primitive

## Parameters[​](#parameters "Direct link to Parameters")

### align[​](#align "Direct link to align")

[`Alignment`](https://docs.midnight.network/api-reference/ledger/type-aliases/Alignment.md)

### val[​](#val "Direct link to val")

[`Value`](https://docs.midnight.network/api-reference/ledger/type-aliases/Value.md)

## Returns[​](#returns "Direct link to Returns")

[`Value`](https://docs.midnight.network/api-reference/ledger/type-aliases/Value.md)

## Throws[​](#throws "Direct link to Throws")

If [val](#hashtocurve) does not have alignment [align](#hashtocurve)
