Documentation
¶
Index ¶
- Constants
- Variables
- type ED521
- func FromBase64String(data string) ED521
- func FromBytes(data []byte) ED521
- func FromHexString(data string) ED521
- func FromPrivateKey(key []byte) ED521
- func FromPrivateKeyDer(der []byte) ED521
- func FromPrivateKeySeed(seed []byte) ED521
- func FromPrivateKeyWithPassword(key []byte, password string) ED521
- func FromPublicKey(key []byte) ED521
- func FromPublicKeyDer(der []byte) ED521
- func FromString(data string) ED521
- func GenerateKey() ED521
- func GenerateKeyWithSeed(reader io.Reader) ED521
- func New() ED521
- func NewED521() ED521
- func (this ED521) AppendError(err ...error) ED521
- func (this ED521) CheckKeyPair() bool
- func (this ED521) CreatePrivateKey() ED521
- func (this ED521) CreatePrivateKeyWithPassword(password string, opts ...any) ED521
- func (this ED521) CreatePublicKey() ED521
- func (this ED521) Error() error
- func (this ED521) FromBase64String(data string) ED521
- func (this ED521) FromBytes(data []byte) ED521
- func (this ED521) FromHexString(data string) ED521
- func (this ED521) FromPrivateKey(key []byte) ED521
- func (this ED521) FromPrivateKeyDer(der []byte) ED521
- func (this ED521) FromPrivateKeySeed(seed []byte) ED521
- func (this ED521) FromPrivateKeyString(keyString string) ED521
- func (this ED521) FromPrivateKeyWithPassword(key []byte, password string) ED521
- func (this ED521) FromPublicKey(key []byte) ED521
- func (this ED521) FromPublicKeyDer(der []byte) ED521
- func (this ED521) FromPublicKeyString(keyString string) ED521
- func (this ED521) FromString(data string) ED521
- func (this ED521) GenerateKey() ED521
- func (this ED521) GenerateKeyWithSeed(reader io.Reader) ED521
- func (this ED521) GetData() []byte
- func (this ED521) GetErrors() []error
- func (this ED521) GetKeyData() []byte
- func (this ED521) GetOptions() *Options
- func (this ED521) GetParsedData() []byte
- func (this ED521) GetPrivateKey() *ed521.PrivateKey
- func (this ED521) GetPrivateKeySeed() []byte
- func (this ED521) GetPrivateKeySeedString() string
- func (this ED521) GetPrivateKeyString() string
- func (this ED521) GetPublicKey() *ed521.PublicKey
- func (this ED521) GetPublicKeyString() string
- func (this ED521) GetVerify() bool
- func (this ED521) MakeKeyDer() ED521
- func (this ED521) MakePublicKey() ED521
- func (this ED521) OnError(fn func([]error)) ED521
- func (this ED521) ParsePrivateKeyFromPEM(key []byte) (crypto.PrivateKey, error)
- func (this ED521) ParsePrivateKeyFromPEMWithPassword(key []byte, password string) (crypto.PrivateKey, error)
- func (this ED521) ParsePublicKeyFromPEM(key []byte) (crypto.PublicKey, error)
- func (this ED521) SetOptions(name string, context ...string) ED521
- func (this ED521) Sign() ED521
- func (this ED521) ToBase64String() string
- func (this ED521) ToBytes() []byte
- func (this ED521) ToHexString() string
- func (this ED521) ToKeyBytes() []byte
- func (this ED521) ToKeyString() string
- func (this ED521) ToString() string
- func (this ED521) ToVerify() bool
- func (this ED521) ToVerifyInt() int
- func (this ED521) Verify(data []byte) ED521
- func (this ED521) WithData(data []byte) ED521
- func (this ED521) WithErrors(errs []error) ED521
- func (this ED521) WithOptions(op *Options) ED521
- func (this ED521) WithParsedData(data []byte) ED521
- func (this ED521) WithPrivateKey(data *ed521.PrivateKey) ED521
- func (this ED521) WithPublicKey(data *ed521.PublicKey) ED521
- func (this ED521) WithVerify(data bool) ED521
- type Options
- type Opts
- type PBKDF2Opts
- type ScryptOpts
Constants ¶
const ( SchemeED521 = ed521.ED521 SchemeED521Ph = ed521.ED521Ph )
Variables ¶
var ( // Get cipher from name GetCipherFromName = pkcs8.GetCipherFromName // Get hash from name GetHashFromName = pkcs8.GetHashFromName )
var ( ErrKeyMustBePEMEncoded = errors.New("go-cryptobin/ed521: invalid key: Key must be a PEM encoded PKCS8 key") ErrNotEdPrivateKey = errors.New("go-cryptobin/ed521: key is not a valid ED521 private key") ErrNotEdPublicKey = errors.New("go-cryptobin/ed521: key is not a valid ED521 public key") )
Functions ¶
This section is empty.
Types ¶
type ED521 ¶
type ED521 struct {
// error list
Errors []error
// contains filtered or unexported fields
}
*
- ED521 *
- @create 2025-12-2
- @author deatil
func FromPrivateKeyDer ¶ added in v1.1.1013
From PrivateKey Der bytes
func FromPrivateKeyWithPassword ¶
From PrivateKey bytes With Password
func FromPublicKeyDer ¶ added in v1.1.1013
From PublicKey Der bytes
func (ED521) CreatePrivateKey ¶
生成私钥 pem 数据 Create PrivateKey PEM data
func (ED521) CreatePrivateKeyWithPassword ¶
生成 PKCS8 私钥带密码 pem 数据 Create PrivateKey PEM data with password CreatePrivateKeyWithPassword("123", "AES256CBC", "SHA256")
func (ED521) CreatePublicKey ¶
生成公钥 pem 数据 Create PublicKey PEM data
func (ED521) FromBase64String ¶
From Base64 String
func (ED521) FromPrivateKey ¶
From PrivateKey bytes
func (ED521) FromPrivateKeyDer ¶
From PrivateKey Der bytes
func (ED521) FromPrivateKeySeed ¶
From PrivateKey Seed bytes
func (ED521) FromPrivateKeyString ¶
PrivateKey hex string private-key: 07e4********;
func (ED521) FromPrivateKeyWithPassword ¶
From PrivateKey bytes With Password
func (ED521) FromPublicKeyDer ¶
From PublicKey Der bytes
func (ED521) FromPublicKeyString ¶
PublicKey hex string
func (ED521) GenerateKeyWithSeed ¶
GenerateKey With Seed
func (ED521) GetPrivateKeySeedString ¶
Get PrivateKeySeed
func (ED521) GetPrivateKeyString ¶
get PrivateKey data hex string
func (ED521) GetPublicKeyString ¶
get PublicKey data hex string
func (ED521) ParsePrivateKeyFromPEM ¶
func (this ED521) ParsePrivateKeyFromPEM(key []byte) (crypto.PrivateKey, error)
Parse PrivateKey From PEM
func (ED521) ParsePrivateKeyFromPEMWithPassword ¶
func (this ED521) ParsePrivateKeyFromPEMWithPassword(key []byte, password string) (crypto.PrivateKey, error)
Parse PrivateKey From PEM With Password
func (ED521) ParsePublicKeyFromPEM ¶
Parse PublicKey From PEM
func (ED521) SetOptions ¶
With options can use types [ED521Ph | ED521]
func (ED521) WithPrivateKey ¶
func (this ED521) WithPrivateKey(data *ed521.PrivateKey) ED521
With PrivateKey
func (ED521) WithPublicKey ¶
With PublicKey