Documentation ¶
Index ¶
- Constants
- func GetDefault() apicryptosuite.CryptoSuite
- func GetECDSAKeyGenOpts(ephemeral bool) apicryptosuite.KeyGenOpts
- func GetECDSAP256KeyGenOpts(ephemeral bool) apicryptosuite.KeyGenOpts
- func GetECDSAP384KeyGenOpts(ephemeral bool) apicryptosuite.KeyGenOpts
- func GetECDSAPrivateKeyImportOpts(ephemeral bool) apicryptosuite.KeyImportOpts
- func GetGMSM2KeyGenOpts(ephemeral bool) apicryptosuite.KeyImportOpts
- func GetGMSM2PrivateKeyImportOpts(ephemeral bool) apicryptosuite.KeyImportOpts
- func GetGMSM2PublicKeyImportOpts(ephemeral bool) apicryptosuite.KeyImportOpts
- func GetRSA2048KeyGenOpts(ephemeral bool) apicryptosuite.KeyGenOpts
- func GetRSA3072KeyGenOpts(ephemeral bool) apicryptosuite.KeyGenOpts
- func GetRSA4096KeyGenOpts(ephemeral bool) apicryptosuite.KeyGenOpts
- func GetSHA256Opts() apicryptosuite.HashOpts
- func GetSHAOpts() apicryptosuite.HashOpts
- func GetX509PublicKeyImportOpts(ephemeral bool) apicryptosuite.KeyImportOpts
- func NewCspSigner(csp apicryptosuite.CryptoSuite, key apicryptosuite.Key) (crypto.Signer, error)
- func PEMtoPrivateKey(raw []byte, pwd []byte) (interface{}, error)
- func PrivateKeyToDER(privateKey *ecdsa.PrivateKey) ([]byte, error)
Constants ¶
const ( ECDSA = bccsp.ECDSA ECDSAP256 = bccsp.ECDSAP256 ECDSAP384 = bccsp.ECDSAP384 ECDSAReRand = bccsp.ECDSAReRand RSA = bccsp.RSA RSA1024 = bccsp.RSA1024 RSA2048 = bccsp.RSA2048 RSA3072 = bccsp.RSA3072 RSA4096 = bccsp.RSA4096 AES = bccsp.AES AES128 = bccsp.AES128 AES192 = bccsp.AES192 AES256 = bccsp.AES256 HMAC = bccsp.HMAC HMACTruncated256 = bccsp.HMACTruncated256 SHA = bccsp.SHA SHA2 = bccsp.SHA2 SHA3 = bccsp.SHA3 SHA256 = bccsp.SHA256 SHA384 = bccsp.SHA384 SHA3_256 = bccsp.SHA3_256 SHA3_384 = bccsp.SHA3_384 X509Certificate = bccsp.X509Certificate )
Variables ¶
This section is empty.
Functions ¶
func GetDefault ¶
func GetDefault() apicryptosuite.CryptoSuite
GetDefault returns default cryptosuite from bccsp factory default
func GetECDSAKeyGenOpts ¶
func GetECDSAKeyGenOpts(ephemeral bool) apicryptosuite.KeyGenOpts
GetECDSAKeyGenOpts returns options for ECDSA key generation.
func GetECDSAP256KeyGenOpts ¶
func GetECDSAP256KeyGenOpts(ephemeral bool) apicryptosuite.KeyGenOpts
GetECDSAP256KeyGenOpts returns options for ECDSA key generation with curve P-256.
func GetECDSAP384KeyGenOpts ¶
func GetECDSAP384KeyGenOpts(ephemeral bool) apicryptosuite.KeyGenOpts
GetECDSAP384KeyGenOpts options for ECDSA key generation with curve P-384.
func GetECDSAPrivateKeyImportOpts ¶
func GetECDSAPrivateKeyImportOpts(ephemeral bool) apicryptosuite.KeyImportOpts
GetECDSAPrivateKeyImportOpts options for ECDSA secret key importation in DER format or PKCS#8 format.
func GetGMSM2KeyGenOpts ¶
func GetGMSM2KeyGenOpts(ephemeral bool) apicryptosuite.KeyImportOpts
func GetGMSM2PrivateKeyImportOpts ¶
func GetGMSM2PrivateKeyImportOpts(ephemeral bool) apicryptosuite.KeyImportOpts
func GetGMSM2PublicKeyImportOpts ¶
func GetGMSM2PublicKeyImportOpts(ephemeral bool) apicryptosuite.KeyImportOpts
func GetRSA2048KeyGenOpts ¶
func GetRSA2048KeyGenOpts(ephemeral bool) apicryptosuite.KeyGenOpts
GetRSA2048KeyGenOpts returns options for RSA key generation at 2048 security.
func GetRSA3072KeyGenOpts ¶
func GetRSA3072KeyGenOpts(ephemeral bool) apicryptosuite.KeyGenOpts
GetRSA3072KeyGenOpts returns options for RSA key generation at 3072 security.
func GetRSA4096KeyGenOpts ¶
func GetRSA4096KeyGenOpts(ephemeral bool) apicryptosuite.KeyGenOpts
GetRSA4096KeyGenOpts returns options for RSA key generation at 4096 security.
func GetSHA256Opts ¶
func GetSHA256Opts() apicryptosuite.HashOpts
GetSHA256Opts returns options relating to SHA-256.
func GetSHAOpts ¶
func GetSHAOpts() apicryptosuite.HashOpts
GetSHAOpts returns options for computing SHA.
func GetX509PublicKeyImportOpts ¶
func GetX509PublicKeyImportOpts(ephemeral bool) apicryptosuite.KeyImportOpts
GetX509PublicKeyImportOpts options for importing public keys from an x509 certificate
func NewCspSigner ¶
func NewCspSigner(csp apicryptosuite.CryptoSuite, key apicryptosuite.Key) (crypto.Signer, error)
NewCspSigner is a bridge for bccsp signer.New call
func PEMtoPrivateKey ¶
PEMtoPrivateKey is a bridge for bccsp utils.PEMtoPrivateKey()
func PrivateKeyToDER ¶
func PrivateKeyToDER(privateKey *ecdsa.PrivateKey) ([]byte, error)
PrivateKeyToDER marshals is bridge for utils.PrivateKeyToDER
Types ¶
This section is empty.