Documentation
¶
Overview ¶
Copyright IBM Corp. 2016 All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright IBM Corp. 2016 All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright IBM Corp. 2016 All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright IBM Corp. 2016 All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
Constants ¶
const (
// PKCS11BasedFactoryName is the name of the factory of the hsm-based BCCSP implementation
PKCS11BasedFactoryName = "P11"
)
const (
// SoftwareBasedFactoryName is the name of the factory of the software-based BCCSP implementation
SoftwareBasedFactoryName = "SW"
)
Variables ¶
This section is empty.
Functions ¶
func GetDefault ¶
GetDefault returns a non-ephemeral (long-term) BCCSP
func GetDefaultOrPanic ¶
GetDefaultOrPanic returns a non-ephemeral (long-term) BCCSP or panic if an error occurs.
Types ¶
type BCCSPFactory ¶
type BCCSPFactory interface {
// Name returns the name of this factory
Name() string
// Get returns an instance of BCCSP using opts.
Get(opts Opts) (bccsp.BCCSP, error)
}
BCCSPFactory is used to get instances of the BCCSP interface. A Factory has name used to address it.
type DefaultOpts ¶
DefaultOpts offers a default implementation for Opts
func (*DefaultOpts) Ephemeral ¶
func (o *DefaultOpts) Ephemeral() bool
Ephemeral returns true if the CSP has to be ephemeral, false otherwise
func (*DefaultOpts) FactoryName ¶
func (o *DefaultOpts) FactoryName() string
FactoryName returns the name of the provider
type Opts ¶
type Opts interface {
// FactoryName returns the name of the factory to be used
FactoryName() string
// Ephemeral returns true if the BCCSP has to be ephemeral, false otherwise
Ephemeral() bool
}
Opts contains options for instantiating BCCSPs.
type PKCS11Factory ¶
type PKCS11Factory struct {
// contains filtered or unexported fields
}
PKCS11Factory is the factory of the HSM-based BCCSP.
func (*PKCS11Factory) Get ¶
func (f *PKCS11Factory) Get(opts Opts) (bccsp.BCCSP, error)
Get returns an instance of BCCSP using Opts.
func (*PKCS11Factory) Name ¶
func (f *PKCS11Factory) Name() string
Name returns the name of this factory
type PKCS11Opts ¶
PKCS11Opts contains options for the P11Factory
func (*PKCS11Opts) Ephemeral ¶
func (o *PKCS11Opts) Ephemeral() bool
Ephemeral returns true if the CSP has to be ephemeral, false otherwise
func (*PKCS11Opts) FactoryName ¶
func (o *PKCS11Opts) FactoryName() string
FactoryName returns the name of the provider
type SWFactory ¶
type SWFactory struct {
// contains filtered or unexported fields
}
SWFactory is the factory of the software-based BCCSP.