unison/unison-src/transcripts/ed25519.output.md

53 lines
1.2 KiB
Markdown
Raw Permalink Normal View History

``` unison
2024-02-24 02:02:24 +03:00
up = 0xs0123456789abcdef
down = 0xsfedcba9876543210
secret = 0xs3885da624f4430c01326d96764da85647d403dae1fcdc9856c51037f9c647032
public = 0xsb14dbcf139c0e73d942a184b419e4f4fab726102bfe2b65c060b113bb379c77c
message = up ++ down ++ up ++ down ++ down ++ up ++ down ++ up
signature = crypto.Ed25519.sign.impl secret public message
sigOkay = match signature with
Left err -> Left err
Right sg -> crypto.Ed25519.verify.impl public message sg
> signature
> sigOkay
```
``` ucm
2024-02-24 02:02:24 +03:00
Loading changes detected in scratch.u.
I found and typechecked these definitions in scratch.u. If you
do an `add` or `update`, here's how your codebase would
change:
⍟ These new definitions are ok to `add`:
down : Bytes
message : Bytes
public : Bytes
secret : Bytes
sigOkay : Either Failure Boolean
signature : Either Failure Bytes
up : Bytes
Now evaluating any watch expressions (lines starting with
`>`)... Ctrl+C cancels.
17 | > signature
Right
0xs0b76988ce7e5147d36597d2a526ec7b8e178b3ae29083598c33c9fbcdf0f84b4ff2f8c5409123dd9a0c54447861c07e21296500a98540f5d5f15d927eaa6d30a
18 | > sigOkay
Right true
```