Documentation ¶
Index ¶
- Constants
- Variables
- func WithLength[T types.DataType](length uint32) key.Option[T]
- func WithMemory[T types.DataType](memory uint32) key.Option[T]
- func WithMethod[T types.DataType](method string) key.Option[T]
- func WithSaltSize[T types.DataType](size int) key.Option[T]
- func WithThreads[T types.DataType](threads uint8) key.Option[T]
- func WithTime[T types.DataType](time uint32) key.Option[T]
- type KeyGeneratorImpl
- type KeyImpl
- func (k *KeyImpl[T]) Algorithm() types.Algorithm
- func (k *KeyImpl[T]) Decrypt(ciphertext T) (plaintext T, err error)
- func (k *KeyImpl[T]) Encrypt(plaintext T) (ciphertext T, err error)
- func (k *KeyImpl[T]) Export() (key T, err error)
- func (k *KeyImpl[T]) PublicKey() (key.Key[T], error)
- func (k *KeyImpl[T]) SKI() T
- func (k *KeyImpl[T]) Sign(msg T) (signature T, err error)
- func (k *KeyImpl[T]) Verify(msg, signature T) (bool, error)
Constants ¶
View Source
const ( MethodArgon2i = "argon2i" MethodArgon2id = "argon2id" )
Variables ¶
View Source
var (
ErrUnsupportedMethod = errors.New("argon2: unsupported method")
)
Functions ¶
Types ¶
type KeyGeneratorImpl ¶
Click to show internal directories.
Click to hide internal directories.