Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/local/bin/gst -q
- subject_num := 7.
- mod := 20201227.
- public := (stdin contents tokenize: '\n') collect: [ :v | v asNumber ].
- p1 := public at: 1.
- p2 := public at: 2.
- loop := 0.
- val := 7.
- [(val ~= p1) and: [val ~= p2]] whileTrue: [
- val := (val * subject_num) \\ mod.
- loop := loop + 1.
- ].
- other := public detect: [ :v | v ~= val ].
- encrypt_key := other.
- loop timesRepeat: [ encrypt_key := (encrypt_key * other) \\ mod ].
- encrypt_key displayNl.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement