Documentation
¶
Index ¶
- type AeadAlgorithm
- type AeadAlgorithmDefaultLengthTag
- type AeadAlgorithmShortenedTag
- type AeadAlgorithmType
- type AeadFactory
- type Algorithm
- func (a *Algorithm) GetAead() *AeadAlgorithm
- func (a *Algorithm) GetAsymmetricEncryption() *AsymmetricEncryptionAlgorithm
- func (a *Algorithm) GetAsymmetricSignature() *AsymmetricSignatureAlgorithm
- func (a *Algorithm) GetCipher() *Cipher
- func (a *Algorithm) GetHash() *HashAlgorithm
- func (a *Algorithm) ToWireInterface() interface{}
- type AsymmetricEncryptionAlgorithm
- type AsymmetricEncryptionFactory
- type AsymmetricEncryptionRsaOaep
- type AsymmetricEncryptionRsaPkcs1V15Crypt
- type AsymmetricSignatureAlgorithm
- func (a *AsymmetricSignatureAlgorithm) GetDeterministicEcdsa() *AsymmetricSignatureDeterministicEcdsa
- func (a *AsymmetricSignatureAlgorithm) GetEcdsa() *AsymmetricSignatureEcdsa
- func (a *AsymmetricSignatureAlgorithm) GetEcdsaAny() *AsymmetricSignatureEcdsaAny
- func (a *AsymmetricSignatureAlgorithm) GetRsaPkcs1V15Sign() *AsymmetricSignatureRsaPkcs1V15Sign
- func (a *AsymmetricSignatureAlgorithm) GetRsaPkcs1V15SignRaw() *AsymmetricSignatureRsaPkcs1V15SignRaw
- func (a *AsymmetricSignatureAlgorithm) GetRsaPss() *AsymmetricSignatureRsaPss
- func (a *AsymmetricSignatureAlgorithm) ToWireInterface() interface{}
- type AsymmetricSignatureDeterministicEcdsa
- type AsymmetricSignatureEcdsa
- type AsymmetricSignatureEcdsaAny
- type AsymmetricSignatureFactory
- type AsymmetricSignatureRsaPkcs1V15Sign
- type AsymmetricSignatureRsaPkcs1V15SignRaw
- type AsymmetricSignatureRsaPss
- type AsymmetricSignatureSignHash
- type AsymmetricSignatureSignHashAny
- type AsymmetricSignatureSignHashSpecific
- type Cipher
- type CipherModeType
- type HashAlgorithm
- type HashAlgorithmType
- type KeyAgreement
- type KeyAgreementFactory
- type KeyAgreementRaw
- type KeyAgreementRawType
- type KeyAgreementWithKeyDerivation
- type KeyDerivation
- type KeyDerivationFactory
- type KeyDerivationHkdf
- type KeyDerivationTLS12Prf
- type KeyDerivationTLS12PskToMs
- type MACFactory
- type MacAlgorithm
- type MacFullLength
- type MacFullLengthCbcMac
- type MacFullLengthCmac
- type MacFullLengthHmac
- type MacTruncated
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AeadAlgorithm ¶
type AeadAlgorithm struct {
// contains filtered or unexported fields
}
func (*AeadAlgorithm) GetAeadDefaultLengthTag ¶
func (a *AeadAlgorithm) GetAeadDefaultLengthTag() *AeadAlgorithmDefaultLengthTag
func (*AeadAlgorithm) GetAeadShortenedTag ¶
func (a *AeadAlgorithm) GetAeadShortenedTag() *AeadAlgorithmShortenedTag
func (*AeadAlgorithm) ToWireInterface ¶
func (a *AeadAlgorithm) ToWireInterface() interface{}
type AeadAlgorithmDefaultLengthTag ¶
type AeadAlgorithmDefaultLengthTag struct {
AeadAlg AeadAlgorithmType
}
func (*AeadAlgorithmDefaultLengthTag) ToWireInterface ¶
func (a *AeadAlgorithmDefaultLengthTag) ToWireInterface() interface{}
type AeadAlgorithmShortenedTag ¶
type AeadAlgorithmShortenedTag struct { AeadAlg AeadAlgorithmType TagLength uint32 }
func (*AeadAlgorithmShortenedTag) ToWireInterface ¶
func (a *AeadAlgorithmShortenedTag) ToWireInterface() interface{}
type AeadAlgorithmType ¶
type AeadAlgorithmType uint32
const ( AeadAlgorithmNODEFAULTTAG AeadAlgorithmType = 0 AeadAlgorithmCCM AeadAlgorithmType = 1 AeadAlgorithmGCM AeadAlgorithmType = 2 AeadAlgorithmChacha20Poly1305 AeadAlgorithmType = 4 )
type AeadFactory ¶
type AeadFactory interface { Aead(algType AeadAlgorithmType) *Algorithm AeadShortenedTag(algType AeadAlgorithmType, tagLength uint32) *Algorithm }
func NewAead ¶
func NewAead() AeadFactory
type Algorithm ¶
type Algorithm struct {
// contains filtered or unexported fields
}
func NewCipher ¶
func NewCipher(mode CipherModeType) *Algorithm
func NewHashAlgorithm ¶
func NewHashAlgorithm(h HashAlgorithmType) *Algorithm
func (*Algorithm) GetAead ¶
func (a *Algorithm) GetAead() *AeadAlgorithm
func (*Algorithm) GetAsymmetricEncryption ¶
func (a *Algorithm) GetAsymmetricEncryption() *AsymmetricEncryptionAlgorithm
func (*Algorithm) GetAsymmetricSignature ¶
func (a *Algorithm) GetAsymmetricSignature() *AsymmetricSignatureAlgorithm
func (*Algorithm) GetHash ¶
func (a *Algorithm) GetHash() *HashAlgorithm
func (*Algorithm) ToWireInterface ¶
func (a *Algorithm) ToWireInterface() interface{}
type AsymmetricEncryptionAlgorithm ¶
type AsymmetricEncryptionAlgorithm struct {
// contains filtered or unexported fields
}
func (*AsymmetricEncryptionAlgorithm) GetRsaOaep ¶
func (a *AsymmetricEncryptionAlgorithm) GetRsaOaep() *AsymmetricEncryptionRsaOaep
func (*AsymmetricEncryptionAlgorithm) GetRsaPkcs1V15Crypt ¶
func (a *AsymmetricEncryptionAlgorithm) GetRsaPkcs1V15Crypt() *AsymmetricEncryptionRsaPkcs1V15Crypt
func (*AsymmetricEncryptionAlgorithm) ToWireInterface ¶
func (a *AsymmetricEncryptionAlgorithm) ToWireInterface() interface{}
type AsymmetricEncryptionFactory ¶
type AsymmetricEncryptionFactory interface { RsaPkcs1V15Crypt() *Algorithm RsaOaep(hashAlg HashAlgorithmType) *Algorithm }
func NewAsymmetricEncryption ¶
func NewAsymmetricEncryption() AsymmetricEncryptionFactory
type AsymmetricEncryptionRsaOaep ¶
type AsymmetricEncryptionRsaOaep struct {
HashAlg HashAlgorithmType
}
func (*AsymmetricEncryptionRsaOaep) ToWireInterface ¶
func (a *AsymmetricEncryptionRsaOaep) ToWireInterface() interface{}
type AsymmetricEncryptionRsaPkcs1V15Crypt ¶
type AsymmetricEncryptionRsaPkcs1V15Crypt struct { }
func (*AsymmetricEncryptionRsaPkcs1V15Crypt) ToWireInterface ¶
func (a *AsymmetricEncryptionRsaPkcs1V15Crypt) ToWireInterface() interface{}
type AsymmetricSignatureAlgorithm ¶
type AsymmetricSignatureAlgorithm struct {
// contains filtered or unexported fields
}
*AsymmetricSignatureRsaPkcs1V15Sign *AsymmetricSignatureRsaPkcs1V15SignRaw *AsymmetricSignatureRsaPss *AsymmetricSignatureEcdsa *AsymmetricSignatureEcdsaAny *AsymmetricSignatureDeterministicEcdsa
func (*AsymmetricSignatureAlgorithm) GetDeterministicEcdsa ¶
func (a *AsymmetricSignatureAlgorithm) GetDeterministicEcdsa() *AsymmetricSignatureDeterministicEcdsa
func (*AsymmetricSignatureAlgorithm) GetEcdsa ¶
func (a *AsymmetricSignatureAlgorithm) GetEcdsa() *AsymmetricSignatureEcdsa
func (*AsymmetricSignatureAlgorithm) GetEcdsaAny ¶
func (a *AsymmetricSignatureAlgorithm) GetEcdsaAny() *AsymmetricSignatureEcdsaAny
func (*AsymmetricSignatureAlgorithm) GetRsaPkcs1V15Sign ¶
func (a *AsymmetricSignatureAlgorithm) GetRsaPkcs1V15Sign() *AsymmetricSignatureRsaPkcs1V15Sign
func (*AsymmetricSignatureAlgorithm) GetRsaPkcs1V15SignRaw ¶
func (a *AsymmetricSignatureAlgorithm) GetRsaPkcs1V15SignRaw() *AsymmetricSignatureRsaPkcs1V15SignRaw
func (*AsymmetricSignatureAlgorithm) GetRsaPss ¶
func (a *AsymmetricSignatureAlgorithm) GetRsaPss() *AsymmetricSignatureRsaPss
func (*AsymmetricSignatureAlgorithm) ToWireInterface ¶
func (a *AsymmetricSignatureAlgorithm) ToWireInterface() interface{}
type AsymmetricSignatureDeterministicEcdsa ¶
type AsymmetricSignatureDeterministicEcdsa struct {
SignHash *AsymmetricSignatureSignHash
}
func (*AsymmetricSignatureDeterministicEcdsa) ToWireInterface ¶
func (a *AsymmetricSignatureDeterministicEcdsa) ToWireInterface() interface{}
type AsymmetricSignatureEcdsa ¶
type AsymmetricSignatureEcdsa struct {
SignHash *AsymmetricSignatureSignHash
}
func (*AsymmetricSignatureEcdsa) ToWireInterface ¶
func (a *AsymmetricSignatureEcdsa) ToWireInterface() interface{}
type AsymmetricSignatureEcdsaAny ¶
type AsymmetricSignatureEcdsaAny struct { }
func (*AsymmetricSignatureEcdsaAny) ToWireInterface ¶
func (a *AsymmetricSignatureEcdsaAny) ToWireInterface() interface{}
type AsymmetricSignatureFactory ¶
type AsymmetricSignatureFactory interface { RsaPkcs1V15Sign(hashAlg HashAlgorithmType) *Algorithm RsaPkcs1V15SignAny() *Algorithm RsaPkcs1V15SignRaw() *Algorithm RsaPss(hashAlg HashAlgorithmType) *Algorithm RsaPssAny() *Algorithm Ecdsa(hashAlg HashAlgorithmType) *Algorithm EcdsaAny() *Algorithm DeterministicEcdsa(hashAlg HashAlgorithmType) *Algorithm DeterministicEcdsaAny() *Algorithm }
func NewAsymmetricSignature ¶
func NewAsymmetricSignature() AsymmetricSignatureFactory
type AsymmetricSignatureRsaPkcs1V15Sign ¶
type AsymmetricSignatureRsaPkcs1V15Sign struct {
SignHash *AsymmetricSignatureSignHash
}
func (*AsymmetricSignatureRsaPkcs1V15Sign) ToWireInterface ¶
func (a *AsymmetricSignatureRsaPkcs1V15Sign) ToWireInterface() interface{}
type AsymmetricSignatureRsaPkcs1V15SignRaw ¶
type AsymmetricSignatureRsaPkcs1V15SignRaw struct { }
func (*AsymmetricSignatureRsaPkcs1V15SignRaw) ToWireInterface ¶
func (a *AsymmetricSignatureRsaPkcs1V15SignRaw) ToWireInterface() interface{}
type AsymmetricSignatureRsaPss ¶
type AsymmetricSignatureRsaPss struct {
SignHash *AsymmetricSignatureSignHash
}
func (*AsymmetricSignatureRsaPss) ToWireInterface ¶
func (a *AsymmetricSignatureRsaPss) ToWireInterface() interface{}
type AsymmetricSignatureSignHash ¶
type AsymmetricSignatureSignHash struct {
// contains filtered or unexported fields
}
func (*AsymmetricSignatureSignHash) GetAny ¶
func (x *AsymmetricSignatureSignHash) GetAny() *AsymmetricSignatureSignHashAny
func (*AsymmetricSignatureSignHash) GetSpecific ¶
func (x *AsymmetricSignatureSignHash) GetSpecific() HashAlgorithmType
type AsymmetricSignatureSignHashAny ¶
type AsymmetricSignatureSignHashAny struct{}
type AsymmetricSignatureSignHashSpecific ¶
type AsymmetricSignatureSignHashSpecific struct {
HashAlg HashAlgorithmType
}
type Cipher ¶
type Cipher struct {
Mode CipherModeType
}
func (*Cipher) ToWireInterface ¶
func (c *Cipher) ToWireInterface() interface{}
type CipherModeType ¶
type CipherModeType int32
const ( CipherModeCIPHERNONE CipherModeType = 0 // This default variant should not be used. CipherModeSTREAMCIPHER CipherModeType = 1 CipherModeCTR CipherModeType = 2 CipherModeCFB CipherModeType = 3 CipherModeOFB CipherModeType = 4 CipherModeXTS CipherModeType = 5 CipherModeECBNOPADDING CipherModeType = 6 CipherModeCBCNOPADDING CipherModeType = 7 CipherModeCBCPKCS7 CipherModeType = 8 )
type HashAlgorithm ¶
type HashAlgorithm struct {
HashAlg HashAlgorithmType
}
func (HashAlgorithm) String ¶
func (a HashAlgorithm) String() string
func (*HashAlgorithm) ToWireInterface ¶
func (a *HashAlgorithm) ToWireInterface() interface{}
type HashAlgorithmType ¶
type HashAlgorithmType uint32
const ( HashAlgorithmTypeNONE HashAlgorithmType = 0 // This default variant should not be used. // Deprecated: Do not use. HashAlgorithmTypeMD2 HashAlgorithmType = 1 // Deprecated: Do not use. HashAlgorithmTypeMD4 HashAlgorithmType = 2 // Deprecated: Do not use. HashAlgorithmTypeMD5 HashAlgorithmType = 3 HashAlgorithmTypeRIPEMD160 HashAlgorithmType = 4 // Deprecated: Do not use. HashAlgorithmTypeSHA1 HashAlgorithmType = 5 HashAlgorithmTypeSHA224 HashAlgorithmType = 6 HashAlgorithmTypeSHA256 HashAlgorithmType = 7 HashAlgorithmTypeSHA384 HashAlgorithmType = 8 HashAlgorithmTypeSHA512 HashAlgorithmType = 9 HashAlgorithmTypeSHA512_224 HashAlgorithmType = 10 HashAlgorithmTypeSHA512_256 HashAlgorithmType = 11 HashAlgorithmTypeSHA3_224 HashAlgorithmType = 12 HashAlgorithmTypeSHA3_256 HashAlgorithmType = 13 HashAlgorithmTypeSHA3_384 HashAlgorithmType = 14 HashAlgorithmTypeSHA3_512 HashAlgorithmType = 15 )
func (HashAlgorithmType) String ¶
func (a HashAlgorithmType) String() string
type KeyAgreement ¶
type KeyAgreement struct {
// contains filtered or unexported fields
}
func (*KeyAgreement) GetRaw ¶
func (a *KeyAgreement) GetRaw() *KeyAgreementRaw
func (*KeyAgreement) GetWithKeyDerivation ¶
func (a *KeyAgreement) GetWithKeyDerivation() *KeyAgreementWithKeyDerivation
func (*KeyAgreement) ToWireInterface ¶
func (a *KeyAgreement) ToWireInterface() interface{}
type KeyAgreementFactory ¶
type KeyAgreementFactory interface { RawFFDH() *Algorithm RawECDH() *Algorithm FFDH(*KeyDerivation) *Algorithm ECDH(*KeyDerivation) *Algorithm }
func NewKeyAgreement ¶
func NewKeyAgreement() KeyAgreementFactory
type KeyAgreementRaw ¶
type KeyAgreementRaw struct {
RawAlg KeyAgreementRawType
}
func (*KeyAgreementRaw) ToWireInterface ¶
func (a *KeyAgreementRaw) ToWireInterface() interface{}
type KeyAgreementRawType ¶
type KeyAgreementRawType int32
const ( KeyAgreementRAWNONE KeyAgreementRawType = 0 // This default variant should not be used. KeyAgreementFFDH KeyAgreementRawType = 1 KeyAgreementECDH KeyAgreementRawType = 2 )
type KeyAgreementWithKeyDerivation ¶
type KeyAgreementWithKeyDerivation struct { KaAlg KeyAgreementRawType DerivationAlg *KeyDerivation }
func (*KeyAgreementWithKeyDerivation) ToWireInterface ¶
func (a *KeyAgreementWithKeyDerivation) ToWireInterface() interface{}
type KeyDerivation ¶
type KeyDerivation struct {
// contains filtered or unexported fields
}
func (*KeyDerivation) GetKeyDerivationHkdf ¶
func (a *KeyDerivation) GetKeyDerivationHkdf() *KeyDerivationHkdf
func (*KeyDerivation) GetKeyDerivationTLS12Prf ¶
func (a *KeyDerivation) GetKeyDerivationTLS12Prf() *KeyDerivationTLS12Prf
func (*KeyDerivation) GetKeyDerivationTLS12PskToMs ¶
func (a *KeyDerivation) GetKeyDerivationTLS12PskToMs() *KeyDerivationTLS12PskToMs
func (*KeyDerivation) ToWireInterface ¶
func (a *KeyDerivation) ToWireInterface() interface{}
type KeyDerivationFactory ¶
type KeyDerivationFactory interface { Hkdf(hashAlg HashAlgorithmType) *Algorithm TLS12PRF(hashAlg HashAlgorithmType) *Algorithm TLS12PSKToMs(hashAlg HashAlgorithmType) *Algorithm }
func NewKeyDerivation ¶
func NewKeyDerivation() KeyDerivationFactory
type KeyDerivationHkdf ¶
type KeyDerivationHkdf struct {
HashAlg HashAlgorithmType
}
func (*KeyDerivationHkdf) ToWireInterface ¶
func (a *KeyDerivationHkdf) ToWireInterface() interface{}
type KeyDerivationTLS12Prf ¶
type KeyDerivationTLS12Prf struct {
HashAlg HashAlgorithmType
}
func (*KeyDerivationTLS12Prf) ToWireInterface ¶
func (a *KeyDerivationTLS12Prf) ToWireInterface() interface{}
type KeyDerivationTLS12PskToMs ¶
type KeyDerivationTLS12PskToMs struct {
HashAlg HashAlgorithmType
}
func (*KeyDerivationTLS12PskToMs) ToWireInterface ¶
func (a *KeyDerivationTLS12PskToMs) ToWireInterface() interface{}
type MACFactory ¶
type MACFactory interface { HMAC(hashAlg HashAlgorithmType) *Algorithm HMACTruncated(hashAlg HashAlgorithmType, macLength uint32) *Algorithm CBCMAC() *Algorithm CBCMACTruncated(macLength uint32) *Algorithm CMAC() *Algorithm CMACTruncated(macLength uint32) *Algorithm }
func NewMAC ¶
func NewMAC() MACFactory
type MacAlgorithm ¶
type MacAlgorithm struct {
// contains filtered or unexported fields
}
func (*MacAlgorithm) ToWireInterface ¶
func (a *MacAlgorithm) ToWireInterface() interface{}
type MacFullLength ¶
type MacFullLength struct {
// contains filtered or unexported fields
}
func (*MacFullLength) ToWireInterface ¶
func (a *MacFullLength) ToWireInterface() interface{}
type MacFullLengthCbcMac ¶
type MacFullLengthCbcMac struct{}
func (*MacFullLengthCbcMac) ToWireInterface ¶
func (a *MacFullLengthCbcMac) ToWireInterface() interface{}
type MacFullLengthCmac ¶
type MacFullLengthCmac struct{}
func (*MacFullLengthCmac) ToWireInterface ¶
func (a *MacFullLengthCmac) ToWireInterface() interface{}
type MacFullLengthHmac ¶
type MacFullLengthHmac struct {
HashAlg HashAlgorithmType
}
func (*MacFullLengthHmac) ToWireInterface ¶
func (a *MacFullLengthHmac) ToWireInterface() interface{}
type MacTruncated ¶
type MacTruncated struct { MacAlg *MacFullLength MacLength uint32 }
func (*MacTruncated) ToWireInterface ¶
func (a *MacTruncated) ToWireInterface() interface{}
Click to show internal directories.
Click to hide internal directories.