Versions in this module Expand all Collapse all v1 v1.4.11 Mar 2, 2021 Changes in this version + type BCCSPEncrypterEntity struct + DOpts bccsp.DecrypterOpts + EKey bccsp.Key + EOpts bccsp.EncrypterOpts + func NewAES256EncrypterEntity(ID string, b bccsp.BCCSP, key, IV []byte) (*BCCSPEncrypterEntity, error) + func NewEncrypterEntity(ID string, bccsp bccsp.BCCSP, eKey bccsp.Key, eOpts bccsp.EncrypterOpts, ...) (*BCCSPEncrypterEntity, error) + func (e *BCCSPEncrypterEntity) Decrypt(ciphertext []byte) ([]byte, error) + func (e *BCCSPEncrypterEntity) Encrypt(plaintext []byte) ([]byte, error) + func (pe *BCCSPEncrypterEntity) Public() (Entity, error) + func (this *BCCSPEncrypterEntity) Equals(e Entity) bool + type BCCSPEncrypterSignerEntity struct + func NewAES256EncrypterECDSASignerEntity(ID string, b bccsp.BCCSP, encKeyBytes, signKeyBytes []byte) (*BCCSPEncrypterSignerEntity, error) + func NewEncrypterSignerEntity(ID string, bccsp bccsp.BCCSP, eKey, sKey bccsp.Key, eOpts bccsp.EncrypterOpts, ...) (*BCCSPEncrypterSignerEntity, error) + func (e *BCCSPEncrypterSignerEntity) ID() string + func (pe *BCCSPEncrypterSignerEntity) Public() (Entity, error) + func (this *BCCSPEncrypterSignerEntity) Equals(e Entity) bool + type BCCSPEntity struct + BCCSP bccsp.BCCSP + IDstr string + func (e *BCCSPEntity) ID() string + type BCCSPSignerEntity struct + HOpts bccsp.HashOpts + SKey bccsp.Key + SOpts bccsp.SignerOpts + func NewECDSASignerEntity(ID string, b bccsp.BCCSP, signKeyBytes []byte) (*BCCSPSignerEntity, error) + func NewECDSAVerifierEntity(ID string, b bccsp.BCCSP, signKeyBytes []byte) (*BCCSPSignerEntity, error) + func NewSignerEntity(ID string, bccsp bccsp.BCCSP, sKey bccsp.Key, sOpts bccsp.SignerOpts, ...) (*BCCSPSignerEntity, error) + func (e *BCCSPSignerEntity) Public() (Entity, error) + func (e *BCCSPSignerEntity) Sign(msg []byte) ([]byte, error) + func (e *BCCSPSignerEntity) Verify(signature, msg []byte) (bool, error) + func (this *BCCSPSignerEntity) Equals(e Entity) bool + type Encrypter interface + Decrypt func(ciphertext []byte) (plaintext []byte, err error) + Encrypt func(plaintext []byte) (ciphertext []byte, err error) + type EncrypterEntity interface + func GetEncrypterEntityForTest(id string) (EncrypterEntity, error) + type EncrypterSignerEntity interface + func GetEncrypterSignerEntityForTest(id string) (EncrypterSignerEntity, error) + type Entity interface + Equals func(Entity) bool + ID func() string + Public func() (Entity, error) + type SignedMessage struct + ID []byte + Payload []byte + Sig []byte + func (m *SignedMessage) FromBytes(d []byte) error + func (m *SignedMessage) Sign(signer Signer) error + func (m *SignedMessage) ToBytes() ([]byte, error) + func (m *SignedMessage) Verify(verifier Signer) (bool, error) + type Signer interface + Sign func(msg []byte) (signature []byte, err error) + Verify func(signature, msg []byte) (valid bool, err error) + type SignerEntity interface