Documentation ¶
Index ¶
- Variables
- type DSAErrorFunc
- type EIGamal
- func FromBase64String(data string) EIGamal
- func FromBytes(data []byte) EIGamal
- func FromHexString(data string) EIGamal
- func FromPKCS1PrivateKey(key []byte) EIGamal
- func FromPKCS1PrivateKeyWithPassword(key []byte, password string) EIGamal
- func FromPKCS1PublicKey(key []byte) EIGamal
- func FromPKCS8PrivateKey(key []byte) EIGamal
- func FromPKCS8PrivateKeyWithPassword(key []byte, password string) EIGamal
- func FromPKCS8PublicKey(key []byte) EIGamal
- func FromPrivateKey(key []byte) EIGamal
- func FromPrivateKeyWithPassword(key []byte, password string) EIGamal
- func FromPublicKey(key []byte) EIGamal
- func FromString(data string) EIGamal
- func FromXMLPrivateKey(key []byte) EIGamal
- func FromXMLPublicKey(key []byte) EIGamal
- func GenerateKey(bitsize, probability int) EIGamal
- func GenerateKeyWithSeed(reader io.Reader, bitsize, probability int) EIGamal
- func New() EIGamal
- func NewEIGamal() EIGamal
- func (this EIGamal) AppendError(err ...error) EIGamal
- func (this EIGamal) CheckKeyPair() bool
- func (this EIGamal) CreatePKCS1PrivateKey() EIGamal
- func (this EIGamal) CreatePKCS1PrivateKeyWithPassword(password string, opts ...string) EIGamal
- func (this EIGamal) CreatePKCS1PublicKey() EIGamal
- func (this EIGamal) CreatePKCS8PrivateKey() EIGamal
- func (this EIGamal) CreatePKCS8PrivateKeyWithPassword(password string, opts ...any) EIGamal
- func (this EIGamal) CreatePKCS8PublicKey() EIGamal
- func (this EIGamal) CreatePrivateKey() EIGamal
- func (this EIGamal) CreatePrivateKeyWithPassword(password string, opts ...string) EIGamal
- func (this EIGamal) CreatePublicKey() EIGamal
- func (this EIGamal) CreateXMLPrivateKey() EIGamal
- func (this EIGamal) CreateXMLPublicKey() EIGamal
- func (this EIGamal) Decrypt() EIGamal
- func (this EIGamal) Encrypt() EIGamal
- func (this EIGamal) Error() error
- func (this EIGamal) FromBase64String(data string) EIGamal
- func (this EIGamal) FromBytes(data []byte) EIGamal
- func (this EIGamal) FromHexString(data string) EIGamal
- func (this EIGamal) FromPKCS1PrivateKey(key []byte) EIGamal
- func (this EIGamal) FromPKCS1PrivateKeyDer(der []byte) EIGamal
- func (this EIGamal) FromPKCS1PrivateKeyWithPassword(key []byte, password string) EIGamal
- func (this EIGamal) FromPKCS1PublicKey(key []byte) EIGamal
- func (this EIGamal) FromPKCS1PublicKeyDer(der []byte) EIGamal
- func (this EIGamal) FromPKCS8PrivateKey(key []byte) EIGamal
- func (this EIGamal) FromPKCS8PrivateKeyDer(der []byte) EIGamal
- func (this EIGamal) FromPKCS8PrivateKeyWithPassword(key []byte, password string) EIGamal
- func (this EIGamal) FromPKCS8PublicKey(key []byte) EIGamal
- func (this EIGamal) FromPKCS8PublicKeyDer(der []byte) EIGamal
- func (this EIGamal) FromPrivateKey(key []byte) EIGamal
- func (this EIGamal) FromPrivateKeyWithPassword(key []byte, password string) EIGamal
- func (this EIGamal) FromPublicKey(key []byte) EIGamal
- func (this EIGamal) FromString(data string) EIGamal
- func (this EIGamal) FromXMLPrivateKey(key []byte) EIGamal
- func (this EIGamal) FromXMLPublicKey(key []byte) EIGamal
- func (this EIGamal) GenerateKey(bitsize, probability int) EIGamal
- func (this EIGamal) GenerateKeyWithSeed(reader io.Reader, bitsize, probability int) EIGamal
- func (this EIGamal) GetData() []byte
- func (this EIGamal) GetErrors() []error
- func (this EIGamal) GetKeyData() []byte
- func (this EIGamal) GetParsedData() []byte
- func (this EIGamal) GetPrivateKey() *elgamal.PrivateKey
- func (this EIGamal) GetPublicKey() *elgamal.PublicKey
- func (this EIGamal) GetSignHash() HashFunc
- func (this EIGamal) GetVerify() bool
- func (this EIGamal) MakeKeyDer() EIGamal
- func (this EIGamal) MakePublicKey() EIGamal
- func (this EIGamal) OnError(fn DSAErrorFunc) EIGamal
- func (this EIGamal) ParsePKCS1PrivateKeyFromPEM(key []byte) (*elgamal.PrivateKey, error)
- func (this EIGamal) ParsePKCS1PrivateKeyFromPEMWithPassword(key []byte, password string) (*elgamal.PrivateKey, error)
- func (this EIGamal) ParsePKCS1PublicKeyFromPEM(key []byte) (*elgamal.PublicKey, error)
- func (this EIGamal) ParsePKCS8PrivateKeyFromPEM(key []byte) (*elgamal.PrivateKey, error)
- func (this EIGamal) ParsePKCS8PrivateKeyFromPEMWithPassword(key []byte, password string) (*elgamal.PrivateKey, error)
- func (this EIGamal) ParsePKCS8PublicKeyFromPEM(key []byte) (*elgamal.PublicKey, error)
- func (this EIGamal) ParsePrivateKeyFromXML(key []byte) (*elgamal.PrivateKey, error)
- func (this EIGamal) ParsePublicKeyFromXML(key []byte) (*elgamal.PublicKey, error)
- func (this EIGamal) SetSignHash(data string) EIGamal
- func (this EIGamal) Sign() EIGamal
- func (this EIGamal) ToBase64String() string
- func (this EIGamal) ToBytes() []byte
- func (this EIGamal) ToHexString() string
- func (this EIGamal) ToKeyBytes() []byte
- func (this EIGamal) ToKeyString() string
- func (this EIGamal) ToString() string
- func (this EIGamal) ToVerify() bool
- func (this EIGamal) ToVerifyInt() int
- func (this EIGamal) Verify(data []byte) EIGamal
- func (this EIGamal) WithData(data []byte) EIGamal
- func (this EIGamal) WithErrors(errs []error) EIGamal
- func (this EIGamal) WithParsedData(data []byte) EIGamal
- func (this EIGamal) WithPrivateKey(data *elgamal.PrivateKey) EIGamal
- func (this EIGamal) WithPublicKey(data *elgamal.PublicKey) EIGamal
- func (this EIGamal) WithSignHash(data HashFunc) EIGamal
- func (this EIGamal) WithVerify(data bool) EIGamal
- type HashFunc
- type Opts
- type PBKDF2Opts
- type ScryptOpts
Constants ¶
This section is empty.
Variables ¶
var ( // 获取 Cipher 类型 GetCipherFromName = cryptobin_pkcs8.GetCipherFromName // 获取 hash 类型 GetHashFromName = cryptobin_pkcs8.GetHashFromName )
Functions ¶
This section is empty.
Types ¶
type EIGamal ¶
type EIGamal struct { // 错误 Errors []error // contains filtered or unexported fields }
*
- EIGamal *
- @create 2023-6-22
- @author deatil
func FromPKCS1PrivateKeyWithPassword ¶
PKCS1 私钥带密码
func FromPKCS8PrivateKeyWithPassword ¶
PKCS8 私钥带密码
func FromPrivateKeyWithPassword ¶
私钥带密码
func GenerateKeyWithSeed ¶ added in v1.0.2026
使用数据生成密钥对
func (EIGamal) CreatePKCS1PrivateKey ¶
生成 pkcs1 私钥 pem 数据
func (EIGamal) CreatePKCS1PrivateKeyWithPassword ¶
生成 pkcs1 私钥带密码 pem 数据 CreatePKCS1PrivateKeyWithPassword("123", "AES256CBC") PEMCipher: DESCBC | DESEDE3CBC | AES128CBC | AES192CBC | AES256CBC
func (EIGamal) CreatePKCS1PublicKey ¶
生成 pkcs1 公钥 pem 数据
func (EIGamal) CreatePKCS8PrivateKey ¶
生成 pkcs8 私钥 pem 数据
func (EIGamal) CreatePKCS8PrivateKeyWithPassword ¶
生成 PKCS8 私钥带密码 pem 数据 CreatePKCS8PrivateKeyWithPassword("123", "AES256CBC", "SHA256")
func (EIGamal) CreatePKCS8PublicKey ¶
生成公钥 pem 数据
func (EIGamal) CreatePrivateKey ¶
生成私钥 pem 数据 elgamal := New().GenerateKey("L2048N256") priKey := elgamal.CreatePrivateKey().ToKeyString()
func (EIGamal) CreatePrivateKeyWithPassword ¶
生成私钥带密码 pem 数据 CreatePrivateKeyWithPassword("123", "AES256CBC") PEMCipher: DESCBC | DESEDE3CBC | AES128CBC | AES192CBC | AES256CBC
func (EIGamal) FromPKCS1PrivateKey ¶
PKCS1 私钥
func (EIGamal) FromPKCS1PrivateKeyDer ¶
Pkcs1 DER 私钥
func (EIGamal) FromPKCS1PrivateKeyWithPassword ¶
PKCS1 私钥带密码
func (EIGamal) FromPKCS1PublicKey ¶
PKCS1 公钥
func (EIGamal) FromPKCS1PublicKeyDer ¶
PKCS1 DER 公钥
func (EIGamal) FromPKCS8PrivateKey ¶
PKCS8 私钥
func (EIGamal) FromPKCS8PrivateKeyDer ¶
Pkcs8 DER 私钥
func (EIGamal) FromPKCS8PrivateKeyWithPassword ¶
PKCS8 私钥带密码
func (EIGamal) FromPKCS8PublicKey ¶
PKCS8 公钥
func (EIGamal) FromPKCS8PublicKeyDer ¶
PKCS8 DER 公钥
func (EIGamal) FromPrivateKeyWithPassword ¶
私钥带密码
func (EIGamal) GenerateKeyWithSeed ¶ added in v1.0.2026
使用数据生成密钥对
func (EIGamal) GetParsedData ¶ added in v1.0.2049
获取 parsedData
func (EIGamal) GetPrivateKey ¶
func (this EIGamal) GetPrivateKey() *elgamal.PrivateKey
获取 PrivateKey
func (EIGamal) ParsePKCS1PrivateKeyFromPEM ¶
func (this EIGamal) ParsePKCS1PrivateKeyFromPEM(key []byte) (*elgamal.PrivateKey, error)
解析私钥
func (EIGamal) ParsePKCS1PrivateKeyFromPEMWithPassword ¶
func (this EIGamal) ParsePKCS1PrivateKeyFromPEMWithPassword(key []byte, password string) (*elgamal.PrivateKey, error)
解析私钥带密码
func (EIGamal) ParsePKCS1PublicKeyFromPEM ¶
解析公钥
func (EIGamal) ParsePKCS8PrivateKeyFromPEM ¶
func (this EIGamal) ParsePKCS8PrivateKeyFromPEM(key []byte) (*elgamal.PrivateKey, error)
解析私钥 PKCS8
func (EIGamal) ParsePKCS8PrivateKeyFromPEMWithPassword ¶
func (this EIGamal) ParsePKCS8PrivateKeyFromPEMWithPassword(key []byte, password string) (*elgamal.PrivateKey, error)
解析 PKCS8 带密码的私钥
func (EIGamal) ParsePKCS8PublicKeyFromPEM ¶
解析公钥 PKCS8
func (EIGamal) ParsePrivateKeyFromXML ¶
func (this EIGamal) ParsePrivateKeyFromXML(key []byte) (*elgamal.PrivateKey, error)
解析 xml 私钥
func (EIGamal) ParsePublicKeyFromXML ¶
解析 xml 公钥
func (EIGamal) SetSignHash ¶
设置 hash 类型 可用参数可查看 Hash 结构体数据
func (EIGamal) WithParsedData ¶ added in v1.0.2049
设置 parsedData
func (EIGamal) WithPrivateKey ¶
func (this EIGamal) WithPrivateKey(data *elgamal.PrivateKey) EIGamal
设置 PrivateKey
func (EIGamal) WithPublicKey ¶
设置 PublicKey