Documentation ¶
Index ¶
- Variables
- type EdDSA
- func FromBase64String(data string) EdDSA
- func FromBytes(data []byte) EdDSA
- func FromHexString(data string) EdDSA
- func FromPrivateKey(key []byte) EdDSA
- func FromPrivateKeySeed(seed []byte) EdDSA
- func FromPrivateKeyWithPassword(key []byte, password string) EdDSA
- func FromPublicKey(key []byte) EdDSA
- func FromString(data string) EdDSA
- func GenerateKey() EdDSA
- func GenerateKeyWithSeed(reader io.Reader) EdDSA
- func New() EdDSA
- func NewEdDSA() EdDSA
- func (this EdDSA) AppendError(err ...error) EdDSA
- func (this EdDSA) CheckKeyPair() bool
- func (this EdDSA) CreatePrivateKey() EdDSA
- func (this EdDSA) CreatePrivateKeyWithPassword(password string, opts ...any) EdDSA
- func (this EdDSA) CreatePublicKey() EdDSA
- func (this EdDSA) Error() error
- func (this EdDSA) FromBase64String(data string) EdDSA
- func (this EdDSA) FromBytes(data []byte) EdDSA
- func (this EdDSA) FromHexString(data string) EdDSA
- func (this EdDSA) FromPrivateKey(key []byte) EdDSA
- func (this EdDSA) FromPrivateKeyDer(der []byte) EdDSA
- func (this EdDSA) FromPrivateKeySeed(seed []byte) EdDSA
- func (this EdDSA) FromPrivateKeyWithPassword(key []byte, password string) EdDSA
- func (this EdDSA) FromPublicKey(key []byte) EdDSA
- func (this EdDSA) FromPublicKeyDer(der []byte) EdDSA
- func (this EdDSA) FromString(data string) EdDSA
- func (this EdDSA) GenerateKey() EdDSA
- func (this EdDSA) GenerateKeyWithSeed(reader io.Reader) EdDSA
- func (this EdDSA) GetData() []byte
- func (this EdDSA) GetErrors() []error
- func (this EdDSA) GetKeyData() []byte
- func (this EdDSA) GetOptions() *Options
- func (this EdDSA) GetParsedData() []byte
- func (this EdDSA) GetPrivateKey() ed25519.PrivateKey
- func (this EdDSA) GetPrivateKeySeed() []byte
- func (this EdDSA) GetPublicKey() ed25519.PublicKey
- func (this EdDSA) GetVerify() bool
- func (this EdDSA) MakeKeyDer() EdDSA
- func (this EdDSA) MakePublicKey() EdDSA
- func (this EdDSA) OnError(fn EdDSAErrorFunc) EdDSA
- func (this EdDSA) ParsePrivateKeyFromPEM(key []byte) (crypto.PrivateKey, error)
- func (this EdDSA) ParsePrivateKeyFromPEMWithPassword(key []byte, password string) (crypto.PrivateKey, error)
- func (this EdDSA) ParsePublicKeyFromPEM(key []byte) (crypto.PublicKey, error)
- func (this EdDSA) SetOptions(name string, context ...string) EdDSA
- func (this EdDSA) Sign() EdDSA
- func (this EdDSA) ToBase64String() string
- func (this EdDSA) ToBytes() []byte
- func (this EdDSA) ToHexString() string
- func (this EdDSA) ToKeyBytes() []byte
- func (this EdDSA) ToKeyString() string
- func (this EdDSA) ToString() string
- func (this EdDSA) ToVerify() bool
- func (this EdDSA) ToVerifyInt() int
- func (this EdDSA) Verify(data []byte) EdDSA
- func (this EdDSA) WithData(data []byte) EdDSA
- func (this EdDSA) WithErrors(errs []error) EdDSA
- func (this EdDSA) WithOptions(op *Options) EdDSA
- func (this EdDSA) WithParsedData(data []byte) EdDSA
- func (this EdDSA) WithPrivateKey(data ed25519.PrivateKey) EdDSA
- func (this EdDSA) WithPublicKey(data ed25519.PublicKey) EdDSA
- func (this EdDSA) WithVerify(data bool) EdDSA
- type EdDSAErrorFunc
- type Options
- type Opts
- type PBKDF2Opts
- type ScryptOpts
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // 获取 Cipher 类型 GetCipherFromName = pkcs8.GetCipherFromName // 获取 hash 类型 GetHashFromName = pkcs8.GetHashFromName )
Functions ¶
This section is empty.
Types ¶
type EdDSA ¶
type EdDSA struct { // 错误 Errors []error // contains filtered or unexported fields }
*
- EdDSA *
- @create 2022-4-3
- @author deatil
func FromPrivateKeyWithPassword ¶ added in v1.0.1018
私钥
func (EdDSA) AppendError ¶ added in v1.0.1026
添加错误
func (EdDSA) CreatePrivateKey ¶
生成私钥 pem 数据 使用: obj := New().GenerateKey() priKey := obj.CreatePrivateKey().ToKeyString()
func (EdDSA) CreatePrivateKeyWithPassword ¶
生成 PKCS8 私钥带密码 pem 数据 CreatePrivateKeyWithPassword("123", "AES256CBC", "SHA256")
func (EdDSA) FromPrivateKeyDer ¶ added in v1.0.2015
DER 私钥
func (EdDSA) FromPrivateKeySeed ¶ added in v1.0.2014
私钥 Seed
func (EdDSA) FromPrivateKeyWithPassword ¶
私钥带密码
func (EdDSA) FromPublicKeyDer ¶ added in v1.0.2015
DER 公钥
func (EdDSA) GenerateKeyWithSeed ¶ added in v1.0.2026
生成密钥
func (EdDSA) GetParsedData ¶ added in v1.0.2049
获取 parsedData
func (EdDSA) GetPrivateKeySeed ¶ added in v1.0.2014
获取 PrivateKeySeed
func (EdDSA) ParsePrivateKeyFromPEM ¶ added in v1.0.1043
func (this EdDSA) ParsePrivateKeyFromPEM(key []byte) (crypto.PrivateKey, error)
解析私钥
func (EdDSA) ParsePrivateKeyFromPEMWithPassword ¶ added in v1.0.1043
func (this EdDSA) ParsePrivateKeyFromPEMWithPassword(key []byte, password string) (crypto.PrivateKey, error)
解析私钥带密码
func (EdDSA) ParsePublicKeyFromPEM ¶ added in v1.0.1043
解析公钥
func (EdDSA) SetOptions ¶ added in v1.0.2014
设置 options 可用类型 [Ed25519ph | Ed25519ctx | Ed25519]
func (EdDSA) WithOptions ¶ added in v1.0.2014
设置 options
func (EdDSA) WithParsedData ¶ added in v1.0.2049
设置 parsedData
func (EdDSA) WithPrivateKey ¶
func (this EdDSA) WithPrivateKey(data ed25519.PrivateKey) EdDSA
设置 PrivateKey
func (EdDSA) WithPublicKey ¶
设置 PublicKey
func (EdDSA) WithVerify ¶ added in v1.0.1032
设置 verify
Click to show internal directories.
Click to hide internal directories.