bits32

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: Apache-2.0, MIT Imports: 2 Imported by: 0

Documentation

Overview

The API for operations relating to [32]vars.Bit inside circuits.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	// contains filtered or unexported fields
}

An API used for operations related to [32]vars.Bit.

func NewAPI

func NewAPI(api builder.API) API

Creates a new bits32.API.

func (*API) Add

func (a *API) Add(in ...[32]vars.Bool) [32]vars.Bool

Computes the binary sum of two 32 bit arrays. Equivalently, think of this as addition modulo 2^32.

func (*API) And

func (a *API) And(in ...[32]vars.Bool) [32]vars.Bool

Computes the and of 32 bit arrays.

func (*API) Not

func (a *API) Not(i1 [32]vars.Bool) [32]vars.Bool

Computes the not of a 32 bit array.

func (*API) Rotate

func (a *API) Rotate(i1 [32]vars.Bool, offset int) [32]vars.Bool

Rotates a 32-length bit array by a given offset to the right.

func (*API) Shr

func (a *API) Shr(i1 [32]vars.Bool, offset int) [32]vars.Bool

Shifts a 32-length bit array by a given offset to the right.

func (*API) Xor

func (a *API) Xor(in ...[32]vars.Bool) [32]vars.Bool

Computes the xor of 32 bit arrays.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL