utils

package
v1.0.0-linux-amd64 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: Apache-2.0 Imports: 8 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeAndPrintKey

func EncodeAndPrintKey(n, e, d string) error

EncodeAndPrintKey is called when the -createkey flag is provided.

func FoundP

func FoundP(p *fmp.Fmpz, ps []*fmp.Fmpz) bool

FoundP returns true if prime p exists in slice ps.

func IsInt

func IsInt(s string) bool

IsInt returns true if the string s contains all unicode digit characters.

func ReadBinary

func ReadBinary(bf string) ([]byte, error)

ReadBinary imports a binary file and returns a slice of bytes of an error.

func ReadCipherText

func ReadCipherText(ct string) ([]byte, error)

ReadCipherText imports a ciphertext binary file and returns a slice of bytes of an error.

func ReportResults

func ReportResults(ks []*keys.RSA)

ReportResults iterates a slice of keys and prints the privatekeys or plaintexts found.

Types

This section is empty.

Jump to

Keyboard shortcuts

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