Skip to main content

encryption

import "github.com/bloock/bloock-sdk-go/v2/entity/encryption"

Index

Variables

EncryptionAlgFromProto
var (
EncryptionAlgFromProto = map[proto.EncryptionAlg]EncryptionAlg{
0: AES256GCM,
1: AES256GCM_M,
2: RSA,
3: RSA_M,
}
EncryptionAlgToProto = map[EncryptionAlg]proto.EncryptionAlg{
AES256GCM: 0,
AES256GCM_M: 0,
RSA: 1,
RSA_M: 1,
}
)
Encrypter

type Encrypter

Encrypter represents an encryption configuration with various key types and access control.

type Encrypter struct {
LocalKey *key.LocalKey
ManagedKey *key.ManagedKey
ManagedCertificate *key.ManagedCertificate
LocalCertificate *key.LocalCertificate
AccessControl *key.AccessControl
}
NewEncrypterWithLocalCertificate

func NewEncrypterWithLocalCertificate

func NewEncrypterWithLocalCertificate(key key.LocalCertificate) Encrypter

NewEncrypterWithLocalCertificate creates a new Encrypter instance with a local certificate for encryption.

NewEncrypterWithLocalKey

func NewEncrypterWithLocalKey

func NewEncrypterWithLocalKey(key key.LocalKey) Encrypter

NewEncrypterWithLocalKey creates a new Encrypter instance with a local encryption key.

NewEncrypterWithManagedCertificate

func NewEncrypterWithManagedCertificate

func NewEncrypterWithManagedCertificate(key key.ManagedCertificate, accessControl *key.AccessControl) Encrypter

NewEncrypterWithManagedCertificate creates a new Encrypter instance with a managed certificate for encryption and access control.

NewEncrypterWithManagedKey

func NewEncrypterWithManagedKey

func NewEncrypterWithManagedKey(key key.ManagedKey, accessControl *key.AccessControl) Encrypter

NewEncrypterWithManagedKey creates a new Encrypter instance with a managed encryption key and access control.

Encrypter.ToProto

func (Encrypter) ToProto

func (s Encrypter) ToProto() *proto.Encrypter
EncrypterArgs

type EncrypterArgs

EncrypterArgs represents the arguments for an encrypter.

type EncrypterArgs struct {
LocalKey *key.LocalKey
ManagedKey *key.ManagedKey
ManagedCertificate *key.ManagedCertificate
LocalCertificate *key.LocalCertificate
}
EncryptionAlg

type EncryptionAlg

EncryptionAlg represents encryption algorithm types.

type EncryptionAlg int32
AES256GCM
const (
// AES256GCM represents the AES-256-GCM encryption algorithm.
AES256GCM EncryptionAlg = iota
// AES256GCM_M represents the AES-256-GCM with managed key encryption algorithm.
AES256GCM_M EncryptionAlg = iota
// RSA represents the RSA encryption algorithm.
RSA EncryptionAlg = iota
// RSA_M represents the RSA with managed key encryption algorithm.
RSA_M EncryptionAlg = iota
// UNRECOGNIZED_ENCRYPTION_ALG represents an unrecognized encryption algorithm.
UNRECOGNIZED_ENCRYPTION_ALG EncryptionAlg = -1
)

Generated by gomarkdoc