Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CCCSP ¶
type CCCSP interface { // KeyGenerate generates a key. KeyGenerate(algorithm string, ephemeral bool) (Key, error) // KeyImport imports a key from its raw representation. KeyImport(raw interface{}, algorithm string, ephemeral bool) (Key, error) // GetKey returns the key this CSP associates to GetKey(id []byte) (Key, error) // Hash hashes messages using specified hash family. Hash(msg []byte, family string) ([]byte, error) // GetHash returns and instance of hash.Hash with hash algorithm GetHash(algo string) (hash.Hash, error) // Sign signs digest using key k. Sign(k Key, digest []byte, opts crypto.SignerOpts) ([]byte, error) // Verify verifies signature against key k and digest. Verify(k Key, signature, digest []byte, opts crypto.SignerOpts) (bool, error) // Encrypt encrypts plaintext using key k. Encrypt(k Key, plaintext []byte, opts EncrypterOpts) ([]byte, error) // Decrypt decrypts ciphertext using key k. Decrypt(k Key, ciphertext []byte, opts DecrypterOpts) ([]byte, error) }
CCCSP is the cloudchain cryptographic service provider that offers the implementation of cryptographic standards and algorithms
type DecrypterOpts ¶
type DecrypterOpts interface{}
DecrypterOpts contains options for decrypting with a CSP.
type Decryptor ¶
type Decryptor interface {
Decrypt(k Key, ciphertext []byte, opts DecrypterOpts) ([]byte, error)
}
Decryptor is a CCCSP-like interface that provides decryption algorithms
type EncrypterOpts ¶
type EncrypterOpts interface{}
EncrypterOpts contains options for encrypting with a CSP.
type Encryptor ¶
type Encryptor interface {
Encrypt(k Key, plaintext []byte, opts EncrypterOpts) ([]byte, error)
}
Encryptor is a CCCSP-like interface that provides encryption algorithms
type Key ¶
type Key interface { // Raw converts this key to its byte representation. Raw() ([]byte, error) // Identifier returns the identifier of this key Identifier() []byte // SKI is for compatibility with Hyperledger Fabric bccsp SKI() []byte // Private returns true if this key is a private key. // false otherwise Private() bool // Public returns the corresponding public key part of // an asymmetric public/private key pair. Public() (Key, error) }
Key represents a cryptographic key
type KeyGenerator ¶
KeyGenerator is a CCCSP-like interface that provides key generation algorithms.
type KeyImporter ¶
KeyImporter is a CCCSP-like interface that provides key import algorithm
Click to show internal directories.
Click to hide internal directories.