encryptedstring

package
v0.13.2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BUFFER_ENC_TYPE_LENGTH = 1
	BUFFER_IV_LENGTH       = 16
	BUFFER_MAC_LENGTH      = 32
	BUFFER_MIN_DATA_LENGTH = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EncryptedString

type EncryptedString struct {
	IV   []byte
	Data []byte
	Hmac []byte
	Key  symmetrickey.Key
}

func New

func New(iv, data, hmac []byte, key symmetrickey.Key) EncryptedString

func NewFromEncryptedBuffer

func NewFromEncryptedBuffer(encBytes []byte) (*EncryptedString, error)

func NewFromEncryptedValue

func NewFromEncryptedValue(encryptedValue string) (*EncryptedString, error)

func (*EncryptedString) Equals

func (encString *EncryptedString) Equals(otherString *EncryptedString) bool

func (*EncryptedString) String

func (encString *EncryptedString) String() string

func (*EncryptedString) ToEncryptedBuffer

func (encString *EncryptedString) ToEncryptedBuffer() ([]byte, error)

Jump to

Keyboard shortcuts

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