kms

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2016 License: MIT Imports: 5 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 represents the wrapper of KMS API client

func NewClient

func NewClient() *Client

NewClient creates new Client object

func (*Client) CreateKey

func (c *Client) CreateKey() (string, error)

CreateKey creates new key and returns key ID

func (*Client) CreateKeyAlias

func (c *Client) CreateKeyAlias(keyID, keyAlias string) error

CreateKeyAlias attaches key alias to the given key

func (*Client) DecryptBase64

func (c *Client) DecryptBase64(key, cipherText string) (string, error)

DecryptBase64 decrypts the given base64-encoded cipher text

func (*Client) EncryptBase64

func (c *Client) EncryptBase64(keyAlias, key, text string) (string, error)

EncryptBase64 encrypts the given text and return as base64-encoded cipher text

func (*Client) KeyExists

func (c *Client) KeyExists(keyAlias string) (bool, error)

KeyExists checks whether the given key exists or not

Jump to

Keyboard shortcuts

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