github.com/hyperledger/aries-framework-go@v0.3.2/pkg/secretlock/local/local_secret_masterkey_reader.go (about) 1 /* 2 Copyright SecureKey Technologies Inc. All Rights Reserved. 3 SPDX-License-Identifier: Apache-2.0 4 */ 5 6 package local 7 8 import ( 9 "io" 10 11 "github.com/hyperledger/aries-framework-go/component/kmscrypto/secretlock/local" 12 ) 13 14 // MasterKeyFromPath creates a new instance of a local secret lock Reader to read a master key stored in `path`. 15 func MasterKeyFromPath(path string) (io.Reader, error) { 16 return local.MasterKeyFromPath(path) 17 } 18 19 // MasterKeyFromEnv creates a new instance of a local secret lock Reader 20 // to read a master key found in a env variable with key: `envPrefix` + `keyURI`. 21 func MasterKeyFromEnv(envPrefix, keyURI string) (io.Reader, error) { 22 return local.MasterKeyFromEnv(envPrefix, keyURI) 23 }