Versions in this module Expand all Collapse all v1 v1.5.0 May 24, 2023 v1.4.0 Oct 31, 2022 Changes in this version type DIDKey + func NewDIDAccountByType(acType, password string, chainID, suffix string) (*DIDKey, error) + func NewDIDFromAccountJson(accountJson, password string, chainID, suffix string) (*DIDKey, error) + func NewDIDFromString(str string, password string) (*DIDKey, error) v1.3.0 Jul 6, 2022 v1.2.2 Jun 7, 2022 v1.2.1 May 18, 2022 v1.2.0 Apr 25, 2022 v1.1.0 Feb 16, 2022 Changes in this version + func GenDIDKeyFromAccountJson(accountJson, password string) (key interface{}, err error) + func NewAccountDID(password string) (string, error) + func NewDIDAccountJson(acType, password string) (string, error) + func ParseDIDAccountJson(accountJson, password string) (newAccountJson string, err error) type ECDSAKey + func NewDIDAccountFromPriv(priv string) (*ECDSAKey, error) v1.0.0 Dec 2, 2021 Changes in this version + const DIDPREFIX + const EC3DES + const EC3DESR1 + const ECAES + const ECAESR1 + const ECDES + const ECDESR1 + const ECKDF2 + const ECKDF2R1 + const ECRAW + const ECRAWR1 + const ED255193DES + const ED25519AES + const ED25519DES + const ED25519RAW + const PKI + const SM3DES + const SMAES + const SMDES + const SMRAW + const SMSM4 + const V1 + const V2 + const V3 + const V4 + func AtPadding(ciphertext []byte, blockSize int) []byte + func DesDecrypt(crypted, key []byte) ([]byte, error) + func DesEncrypt(origData, key []byte) ([]byte, error) + func GenKeyFromAccountJson(accountJson, password string) (key interface{}, err error) + func NewAccount(password string) (string, error) + func NewAccountED25519(password string) (string, error) + func NewAccountJson(acType, password string) (string, error) + func NewAccountJsonFromPfx(password string, pfx []byte) (string, error) + func NewAccountR1(password string) (string, error) + func NewAccountSm2(password string) (string, error) + func PKCS5Padding(ciphertext []byte, blockSize int) []byte + func PKCS5UnPadding(origData []byte) []byte + func ParseAccountJson(accountJson, password string) (newAccountJson string, err error) + func ZeroPadding(ciphertext []byte, blockSize int) []byte + type DIDKey struct + Key Key + func NewDIDAccount(key Key, chainID, suffix string) (didKey *DIDKey) + func (didKey *DIDKey) GetAddress() string + func (didKey *DIDKey) GetNormalKey() Key + func (didKey *DIDKey) PrivateBytes() ([]byte, error) + func (didKey *DIDKey) PublicBytes() ([]byte, error) + type ECDSAKey struct + func NewAccountFromAccountJSON(accountjson, password string) (key *ECDSAKey, err error) + func NewAccountFromPriv(priv string) (*ECDSAKey, error) + func NewAccountR1FromPriv(priv string) (*ECDSAKey, error) + func (key *ECDSAKey) GetAddress() common.Address + func (key *ECDSAKey) PrivateBytes() ([]byte, error) + func (key *ECDSAKey) PublicBytes() ([]byte, error) + type ED25519Key struct + func (key *ED25519Key) GetAddress() common.Address + func (key *ED25519Key) PrivateBytes() ([]byte, error) + func (key *ED25519Key) PublicBytes() ([]byte, error) + type Key interface + GetAddress func() common.Address + PrivateBytes func() ([]byte, error) + PublicBytes func() ([]byte, error) + type PKIKey struct + func NewAccountFromCert(pfx []byte, password string) (key *PKIKey, err error) + func NewAccountPKI(password string, pfx []byte) (key *PKIKey, err error) + func (key *PKIKey) GetAddress() common.Address + func (key *PKIKey) GetEncodedPfx() string + func (key *PKIKey) GetEncodedPrivKey() string + func (key *PKIKey) GetNormalKey() Key + func (key *PKIKey) PrivateBytes() ([]byte, error) + func (key *PKIKey) PublicBytes() ([]byte, error) + type SM2Key struct + func NewAccountSm2FromAccountJSON(accountjson, password string) (key *SM2Key, err error) + func NewAccountSm2FromPriv(priv string) (*SM2Key, error) + func (key *SM2Key) GetAddress() common.Address + func (key *SM2Key) PrivateBytes() ([]byte, error) + func (key *SM2Key) PublicBytes() ([]byte, error) v0 v0.1.2 Jul 21, 2021 v0.1.0 Nov 5, 2021