common

package
v0.0.0-...-982e07a Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidPlaintextLength = errors.New("plaintext length cannot be negative")
	ErrInvalidPlaintextSide   = errors.New("plaintext side must be left of right")
	ErrInvalidMaskingPattern  = errors.New("masking pattern can't be empty")
)

Validaton errors

Functions

func ValidateMaskingParams

func ValidateMaskingParams(pattern string, plaintextLength int, plaintextSide PlainTextSide, dataType common.EncryptedType) error

ValidateMaskingParams checks and returns an error if masking parameters are incorrect.

Types

type PlainTextSide

type PlainTextSide string

PlainTextSide defines which side of data is left untouched (in plain), and which is masked with a pattern.

const (
	PlainTextSideLeft  PlainTextSide = "left"
	PlainTextSideRight PlainTextSide = "right"
)

Allowable values for PlainTextSide

Jump to

Keyboard shortcuts

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