mirror of
https://github.com/pseXperiments/icicle.git
synced 2026-01-09 21:17:56 -05:00
This PR introduces major updates for ICICLE Core, Rust and Golang bindings --------- Co-authored-by: Yuval Shekel <yshekel@gmail.com> Co-authored-by: DmytroTym <dmytrotym1@gmail.com> Co-authored-by: Otsar <122266060+Otsar-Raikou@users.noreply.github.com> Co-authored-by: VitaliiH <vhnatyk@gmail.com> Co-authored-by: release-bot <release-bot@ingonyama.com> Co-authored-by: Stas <spolonsky@icloud.com> Co-authored-by: Jeremy Felder <jeremy.felder1@gmail.com> Co-authored-by: ImmanuelSegol <3ditds@gmail.com> Co-authored-by: JimmyHongjichuan <45908291+JimmyHongjichuan@users.noreply.github.com> Co-authored-by: pierre <pierreuu@gmail.com> Co-authored-by: Leon Hibnik <107353745+LeonHibnik@users.noreply.github.com> Co-authored-by: nonam3e <timur@ingonyama.com> Co-authored-by: Vlad <88586482+vladfdp@users.noreply.github.com> Co-authored-by: LeonHibnik <leon@ingonyama.com> Co-authored-by: nonam3e <71525212+nonam3e@users.noreply.github.com> Co-authored-by: vladfdp <vlad.heintz@gmail.com>
32 lines
552 B
Go
32 lines
552 B
Go
package test_helpers
|
|
|
|
import (
|
|
"math/rand"
|
|
)
|
|
|
|
func GenerateRandomLimb(size int) []uint32 {
|
|
limbs := make([]uint32, size)
|
|
for i := range limbs {
|
|
limbs[i] = rand.Uint32()
|
|
}
|
|
return limbs
|
|
}
|
|
|
|
func GenerateLimbOne(size int) []uint32 {
|
|
limbs := make([]uint32, size)
|
|
limbs[0] = 1
|
|
return limbs
|
|
}
|
|
|
|
func GenerateBytesArray(size int) ([]byte, []uint32) {
|
|
baseBytes := []byte{1, 2, 3, 4}
|
|
var bytes []byte
|
|
var limbs []uint32
|
|
for i := 0; i < size; i++ {
|
|
bytes = append(bytes, baseBytes...)
|
|
limbs = append(limbs, 67305985)
|
|
}
|
|
|
|
return bytes, limbs
|
|
}
|