operations

package
v0.0.0-...-f0a77d2 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client is a Parsec client representing a connection and set of API implementations

func InitClient

func InitClient() (*Client, error)

InitClient initializes a Parsec client

func InitClientFromConnection

func InitClientFromConnection(conn connection.Connection) (*Client, error)

InitClient initializes a Parsec client

func (*Client) Close

func (c *Client) Close() error

func (Client) DeleteClient

func (c Client) DeleteClient(provider requests.ProviderID, authenticator auth.Authenticator, client string) error

func (Client) ListAuthenticators

func (c Client) ListAuthenticators(provider requests.ProviderID, authenticator auth.Authenticator) ([]*listauthenticators.AuthenticatorInfo, error)

ListAuthenticators obtain authenticators supported by server

func (Client) ListClients

func (c Client) ListClients(provider requests.ProviderID, authenticator auth.Authenticator) ([]string, error)

ListClients lists the clients

func (Client) ListKeys

func (c Client) ListKeys(provider requests.ProviderID, authenticator auth.Authenticator) ([]*listkeys.KeyInfo, error)

ListKeys obtain keys stored for current application

func (Client) ListOpcodes

func (c Client) ListOpcodes(provider requests.ProviderID, authenticator auth.Authenticator, providerID uint32) ([]uint32, error)

ListOpcodes list the opcodes for a provider

func (Client) ListProviders

func (c Client) ListProviders(provider requests.ProviderID, authenticator auth.Authenticator) ([]*listproviders.ProviderInfo, error)

ListProviders returns a list of the providers supported by the server.

func (Client) Ping

func (c Client) Ping(provider requests.ProviderID, authenticator auth.Authenticator) (uint8, uint8, error)

Ping server and return wire protocol major and minor version number

func (Client) PsaAeadDecrypt

func (c Client) PsaAeadDecrypt(provider requests.ProviderID, authenticator auth.Authenticator, keyName string, alg *psaalgorithm.Algorithm_Aead, nonce, additionalData, ciphertext []byte) ([]byte, error)

func (Client) PsaAeadEncrypt

func (c Client) PsaAeadEncrypt(provider requests.ProviderID, authenticator auth.Authenticator, keyName string, alg *psaalgorithm.Algorithm_Aead, nonce, additionalData, plaintext []byte) ([]byte, error)

func (Client) PsaAsymmetricDecrypt

func (c Client) PsaAsymmetricDecrypt(provider requests.ProviderID, authenticator auth.Authenticator, keyName string, alg *psaalgorithm.Algorithm_AsymmetricEncryption, salt, ciphertext []byte) ([]byte, error)

func (Client) PsaAsymmetricEncrypt

func (c Client) PsaAsymmetricEncrypt(provider requests.ProviderID, authenticator auth.Authenticator, keyName string, alg *psaalgorithm.Algorithm_AsymmetricEncryption, salt, plaintext []byte) ([]byte, error)

func (Client) PsaCipherDecrypt

func (c Client) PsaCipherDecrypt(provider requests.ProviderID, authenticator auth.Authenticator, keyName string, alg psaalgorithm.Algorithm_Cipher, ciphertext []byte) ([]byte, error)

PsaCipherDecrypt decrypts symmetrically encrypted ciphertext using defined key/algorithm, returning plaintext

func (Client) PsaCipherEncrypt

func (c Client) PsaCipherEncrypt(provider requests.ProviderID, authenticator auth.Authenticator, keyName string, alg psaalgorithm.Algorithm_Cipher, plaintext []byte) ([]byte, error)

PsaCipherEncrypt carries out symmetric encryption on plaintext using defined key/algorithm, returning ciphertext

func (Client) PsaDestroyKey

func (c Client) PsaDestroyKey(provider requests.ProviderID, authenticator auth.Authenticator, name string) error

PsaDestroyKey destroys a key with given name

func (Client) PsaExportKey

func (c Client) PsaExportKey(provider requests.ProviderID, authenticator auth.Authenticator, keyName string) ([]byte, error)

func (Client) PsaExportPublicKey

func (c Client) PsaExportPublicKey(provider requests.ProviderID, authenticator auth.Authenticator, keyName string) ([]byte, error)

func (Client) PsaGenerateKey

func (c Client) PsaGenerateKey(provider requests.ProviderID, authenticator auth.Authenticator, name string, attributes *psakeyattributes.KeyAttributes) error

PsaGenerateKey create key named name with attributes

func (Client) PsaGenerateRandom

func (c Client) PsaGenerateRandom(provider requests.ProviderID, authenticator auth.Authenticator, size uint64) ([]byte, error)

func (Client) PsaHashCompute

func (c Client) PsaHashCompute(provider requests.ProviderID, authenticator auth.Authenticator, message []byte, alg psaalgorithm.Algorithm_Hash) ([]byte, error)

PsaHashCompute calculates a hash of a message using specified algorithm

func (Client) PsaImportKey

func (c Client) PsaImportKey(provider requests.ProviderID, authenticator auth.Authenticator, keyName string, attributes *psakeyattributes.KeyAttributes, data []byte) error

func (Client) PsaMACCompute

func (c Client) PsaMACCompute(provider requests.ProviderID, authenticator auth.Authenticator, keyName string, alg *psaalgorithm.Algorithm_Mac, input []byte) ([]byte, error)

func (Client) PsaMACVerify

func (c Client) PsaMACVerify(provider requests.ProviderID, authenticator auth.Authenticator, keyName string, alg *psaalgorithm.Algorithm_Mac, input, mac []byte) error

func (Client) PsaRawKeyAgreement

func (c Client) PsaRawKeyAgreement(provider requests.ProviderID, authenticator auth.Authenticator, alg *psaalgorithm.Algorithm_KeyAgreement_Raw, privateKey string, peerKey []byte) ([]byte, error)

func (Client) PsaSignHash

func (c Client) PsaSignHash(provider requests.ProviderID, authenticator auth.Authenticator, signingKey string, hash []byte, alg *psaalgorithm.Algorithm_AsymmetricSignature) ([]byte, error)

PsaSignHash signs hash using signingKey and algorithm, returning the signature.

func (Client) PsaSignMessage

func (c Client) PsaSignMessage(provider requests.ProviderID, authenticator auth.Authenticator, signingKey string, message []byte, alg *psaalgorithm.Algorithm_AsymmetricSignature) ([]byte, error)

PsaSignMessage signs message using signingKey and algorithm, returning the signature.

func (Client) PsaVerifyHash

func (c Client) PsaVerifyHash(provider requests.ProviderID, authenticator auth.Authenticator, verifyingKey string, hash, signature []byte, alg *psaalgorithm.Algorithm_AsymmetricSignature) error

PsaVerifyHash verify a signature of hash with verifyingKey using signature algorithm alg.

func (Client) PsaVerifyMessage

func (c Client) PsaVerifyMessage(provider requests.ProviderID, authenticator auth.Authenticator, verifyingKey string, message, signature []byte, alg *psaalgorithm.Algorithm_AsymmetricSignature) error

PsaVerifyMessage verify a signature of message with verifyingKey using signature algorithm alg.

Jump to

Keyboard shortcuts

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