Documentation ¶
Index ¶
- func BuildCryptoSuiteConfigFromOptions(opts ...interface{}) (core.CryptoSuiteConfig, error)
- func ConfigFromBackend(coreBackend ...core.ConfigBackend) core.CryptoSuiteConfig
- func DefaultInitialized() bool
- func GetDefault() core.CryptoSuite
- func GetECDSAP256KeyGenOpts(ephemeral bool) core.KeyGenOpts
- func GetECDSAPrivateKeyImportOpts(ephemeral bool) core.KeyImportOpts
- func GetSHA256Opts() core.HashOpts
- func GetSHAOpts() core.HashOpts
- func IsCryptoConfigFullyOverridden(c *CryptoConfigOptions) bool
- func SetDefault(newDefaultSuite core.CryptoSuite) error
- func UpdateMissingOptsWithDefaultConfig(c *CryptoConfigOptions, d core.CryptoSuiteConfig) core.CryptoSuiteConfig
- type Config
- func (c *Config) IsSecurityEnabled() bool
- func (c *Config) KeyStorePath() string
- func (c *Config) SecurityAlgorithm() string
- func (c *Config) SecurityLevel() int
- func (c *Config) SecurityProvider() string
- func (c *Config) SecurityProviderLabel() string
- func (c *Config) SecurityProviderLibPath() string
- func (c *Config) SecurityProviderPin() string
- func (c *Config) SoftVerify() bool
- type CryptoConfigOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildCryptoSuiteConfigFromOptions ¶
func BuildCryptoSuiteConfigFromOptions(opts ...interface{}) (core.CryptoSuiteConfig, error)
BuildCryptoSuiteConfigFromOptions will return an CryptoConfig instance pre-built with Optional interfaces provided in fabsdk's WithConfigCrypto(opts...) call
func ConfigFromBackend ¶
func ConfigFromBackend(coreBackend ...core.ConfigBackend) core.CryptoSuiteConfig
ConfigFromBackend returns CryptoSuite config implementation for given backend
func DefaultInitialized ¶
func DefaultInitialized() bool
DefaultInitialized returns true if a default suite has already been set.
func GetECDSAP256KeyGenOpts ¶
func GetECDSAP256KeyGenOpts(ephemeral bool) core.KeyGenOpts
GetECDSAP256KeyGenOpts returns options for ECDSA key generation with curve P-256.
func GetECDSAPrivateKeyImportOpts ¶
func GetECDSAPrivateKeyImportOpts(ephemeral bool) core.KeyImportOpts
GetECDSAPrivateKeyImportOpts options for ECDSA secret key importation in DER format or PKCS#8 format.
func GetSHA256Opts ¶
GetSHA256Opts returns options relating to SHA-256.
func IsCryptoConfigFullyOverridden ¶
func IsCryptoConfigFullyOverridden(c *CryptoConfigOptions) bool
IsCryptoConfigFullyOverridden will return true if all of the argument's sub interfaces is not nil (ie CryptoSuiteConfig interface not fully overridden)
func SetDefault ¶
func SetDefault(newDefaultSuite core.CryptoSuite) error
SetDefault sets default suite if one is not already set or created Make sure you set default suite before very first call to GetDefault(), otherwise this function will return an error
func UpdateMissingOptsWithDefaultConfig ¶
func UpdateMissingOptsWithDefaultConfig(c *CryptoConfigOptions, d core.CryptoSuiteConfig) core.CryptoSuiteConfig
UpdateMissingOptsWithDefaultConfig will verify if any functions of the CryptoConfig were not updated with fabsdk's WithConfigCrypto(opts...) call, then use default CryptoConfig interface for these functions instead
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config represents the crypto suite configuration for the client
func (*Config) IsSecurityEnabled ¶
IsSecurityEnabled config used enable and disable security in cryptosuite
func (*Config) KeyStorePath ¶
KeyStorePath returns the keystore path used by BCCSP
func (*Config) SecurityAlgorithm ¶
SecurityAlgorithm returns cryptoSuite config hash algorithm
func (*Config) SecurityLevel ¶
SecurityLevel returns cryptSuite config security level
func (*Config) SecurityProvider ¶
SecurityProvider provider SW or PKCS11
func (*Config) SecurityProviderLabel ¶
SecurityProviderLabel will be set only if provider is PKCS11
func (*Config) SecurityProviderLibPath ¶
SecurityProviderLibPath will be set only if provider is PKCS11
func (*Config) SecurityProviderPin ¶
SecurityProviderPin will be set only if provider is PKCS11
type CryptoConfigOptions ¶
type CryptoConfigOptions struct {
// contains filtered or unexported fields
}
CryptoConfigOptions represents CryptoConfig interface with overridable interface functions if a function is not overridden, the default CryptoConfig implementation will be used.