ioeither

package
v1.0.39 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CryptoEncryptAndSignContract

func CryptoEncryptAndSignContract(cert []byte) func([]byte) func(Contract.RawMap) IOE.IOEither[error, Contract.RawMap]

CryptoEncryptAndSignContract returns the crypto implementation of the encryption and signer

func DefaultEncryptAndSignContract

func DefaultEncryptAndSignContract(encrypter Encrypt.Encryption) func(cert []byte) func(privKey []byte) func(Contract.RawMap) IOE.IOEither[error, Contract.RawMap]

DefaultEncryptAndSignContract returns an implementation of the encryption and signer for the given encryption instance

cert - certificate used to encrypt the contract privKey - private key used to sign the environment and workload section

func EncryptAndSignContract

func EncryptAndSignContract(
	enc func(data []byte) IOE.IOEither[error, string],
	signer func([]byte) func([]byte) IOE.IOEither[error, []byte],
	pubKey func([]byte) E.Either[error, []byte],
) func([]byte) func(Contract.RawMap) IOE.IOEither[error, Contract.RawMap]

EncryptAndSignContract returns a function that signs the workload and env part of a contract and that adds the public key of the signature to the map the value of the input map must either be of type `string` or of type `Contract.RawMap`

- enc encrypts a piece of data - signer signs a piece of data - pubKey extracts the public key from the private key

func OpenSSLEncryptAndSignContract

func OpenSSLEncryptAndSignContract(cert []byte) func([]byte) func(Contract.RawMap) IOE.IOEither[error, Contract.RawMap]

OpenSSLEncryptAndSignContract returns the OpenSSL implementation of the encryption and signer

Types

This section is empty.

Jump to

Keyboard shortcuts

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