yckmstink

package module
v0.0.0-...-09629b6 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package yckmstink provides integration with the Yandex.Cloud KMS.

Package yckmstink provides integration with the Yandex.Cloud KMS.

Index

Constants

View Source
const (
	YCKMSPrefix = "yc-kms://"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type YCAEAD

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

YCAEAD represents a encrypt/decrypt service using particular keyID

func NewYCAEAD

func NewYCAEAD(keyID string, sdk *ycsdk.SDK) *YCAEAD

NewYCAEAD returns a new AEAD instance backed by keyID.

func (*YCAEAD) Decrypt

func (aead *YCAEAD) Decrypt(ciphertext, additionalData []byte) ([]byte, error)

Decrypt AEAD decrypts the data and verified the additional data.

func (*YCAEAD) Encrypt

func (aead *YCAEAD) Encrypt(plaintext, additionalData []byte) ([]byte, error)

Encrypt AEAD encrypts the plaintext data and uses addtional data from authentication.

type YCKMSClient

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

YCKMSClient represents a client that connects to the Yandex.Cloud KMS backend.

func NewYCKMSClient

func NewYCKMSClient(keyURI string, sdk *ycsdk.SDK) (*YCKMSClient, error)

NewYCKMSClient returns a new client to Yandex.Cloud KMS. If keyURI is not empty, the client is bound to the URI.

func (*YCKMSClient) GetAEAD

func (c *YCKMSClient) GetAEAD(keyURI string) (tink.AEAD, error)

GetAEAD gets a new AEAD instance backed by keyURI.

func (*YCKMSClient) Supported

func (c *YCKMSClient) Supported(keyURI string) bool

Supported returns true if this client does support keyURI

Directories

Path Synopsis
examples

Jump to

Keyboard shortcuts

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