Documentation ¶
Index ¶
Constants ¶
View Source
const Name = "ecc"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Decryptor ¶
type Decryptor struct {
// contains filtered or unexported fields
}
func NewDecryptor ¶
func NewDecryptor(opts ...DecryptorOption) *Decryptor
type DecryptorOption ¶
type DecryptorOption func(o *decryptorOptions)
func WithDecryptorPrivateKey ¶
func WithDecryptorPrivateKey(privateKey string) DecryptorOption
WithDecryptorPrivateKey 设置解密私钥
func WithDecryptorShareInfo ¶
func WithDecryptorShareInfo(s1, s2 string) DecryptorOption
WithDecryptorShareInfo 设置共享信息
type Encryptor ¶
type Encryptor struct {
// contains filtered or unexported fields
}
func NewEncryptor ¶
func NewEncryptor(opts ...EncryptorOption) *Encryptor
type EncryptorOption ¶
type EncryptorOption func(o *encryptorOptions)
func WithEncryptorPublicKey ¶
func WithEncryptorPublicKey(publicKey string) EncryptorOption
WithEncryptorPublicKey 设置加密公钥
func WithEncryptorShareInfo ¶
func WithEncryptorShareInfo(s1, s2 string) EncryptorOption
WithEncryptorShareInfo 设置共享信息
type Key ¶
type Key struct {
// contains filtered or unexported fields
}
func (*Key) MarshalPrivateKey ¶
MarshalPrivateKey 编码私钥
func (*Key) MarshalPublicKey ¶
MarshalPublicKey 编码公钥
type Signer ¶
type Signer struct {
// contains filtered or unexported fields
}
func NewSigner ¶
func NewSigner(opts ...SignerOption) *Signer
type SignerOption ¶
type SignerOption func(o *signerOptions)
func WithSignerDelimiter ¶
func WithSignerDelimiter(delimiter string) SignerOption
WithSignerDelimiter 设置签名分割符
func WithSignerPrivateKey ¶
func WithSignerPrivateKey(privateKey string) SignerOption
WithSignerPrivateKey 设置解密私钥
type Verifier ¶
type Verifier struct {
// contains filtered or unexported fields
}
func NewVerifier ¶
func NewVerifier(opts ...VerifierOption) *Verifier
type VerifierOption ¶
type VerifierOption func(o *verifierOption)
func WithVerifierDelimiter ¶
func WithVerifierDelimiter(delimiter string) VerifierOption
WithVerifierDelimiter 设置签名分割符
func WithVerifierHash ¶
func WithVerifierHash(hash hash.Hash) VerifierOption
WithVerifierHash 设置加密hash算法
func WithVerifierPublicKey ¶
func WithVerifierPublicKey(publicKey string) VerifierOption
WithVerifierPublicKey 设置验签公钥
Click to show internal directories.
Click to hide internal directories.