forked from hyperledger/fabric-sdk-go
/
provider.go
34 lines (28 loc) · 849 Bytes
/
provider.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
Copyright SecureKey Technologies Inc. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package core
//CryptoSuiteConfig contains sdk configuration items for cryptosuite.
type CryptoSuiteConfig interface {
IsSecurityEnabled() bool
SecurityAlgorithm() string
SecurityLevel() int
SecurityProvider() string
SoftVerify() bool
SecurityProviderLibPath() string
SecurityProviderPin() string
SecurityProviderLabel() string
KeyStorePath() string
}
// Providers represents the SDK configured core providers context.
type Providers interface {
CryptoSuite() CryptoSuite
SigningManager() SigningManager
}
//ConfigProvider provides config backend for SDK
type ConfigProvider func() ([]ConfigBackend, error)
//ConfigBackend backend for all config types in SDK
type ConfigBackend interface {
Lookup(key string) (interface{}, bool)
}