Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DerivationKeyV1 ¶
Types ¶
type ConfirmationLink ¶
type ConfirmationLink[T any] struct { // Secret []byte SecretGCM *SecretGCM[T] DefaultQueryKey string // 默认key 是 token // contains filtered or unexported fields }
func NewConfirmationLink ¶
func NewConfirmationLink[T any](key string, UrlStr string) *ConfirmationLink[T]
func (*ConfirmationLink[T]) Decrypt ¶
func (cl *ConfirmationLink[T]) Decrypt(ciphertext string) (*T, error)
Decrypt Encrypt加密后的数据解密 obj
func (*ConfirmationLink[T]) Encrypt ¶
func (cl *ConfirmationLink[T]) Encrypt(obj *T) (string, error)
Encrypt golang加密后的数据
func (*ConfirmationLink[T]) Generate ¶
func (cl *ConfirmationLink[T]) Generate(obj *T) (string, error)
Generate 序列化链接传入需求的obj
func (*ConfirmationLink[T]) GenerateWithToken ¶
func (cl *ConfirmationLink[T]) GenerateWithToken(token string) (string, error)
GenerateWithToken 序列化url带token
type ISecretEncDec ¶
type SecretCRT ¶
type SecretCRT[T any] struct { EncDec ISecretEncDec // contains filtered or unexported fields }
func (*SecretCRT[T]) UpdateDerivationKeyFunc ¶
type SecretGCM ¶
type SecretGCM[T any] struct { EncDec ISecretEncDec // contains filtered or unexported fields }
func NewSecretGCM ¶
func (*SecretGCM[T]) UpdateDerivationKeyFunc ¶
Click to show internal directories.
Click to hide internal directories.