Documentation ¶
Overview ¶
This is a mirror of golang.org/x/crypto/internal/subtle.
go官方没有实现ecb加密模式
Index ¶
- Constants
- func AnyOverlap(x, y []byte) bool
- func Bn2Bytes(bn *big.Int, bnLen int) []byte
- func ComputeSessionKey(clientPrivKey *DhKey, serverPubKey []byte) []byte
- func InexactOverlap(x, y []byte) bool
- func NewECBDecrypter(b cipher.Block) cipher.BlockMode
- func NewECBEncrypter(b cipher.Block) cipher.BlockMode
- func NewTLSFromTCP(conn *net.TCPConn, sslCertPath string, sslKeyPath string, user string) (*tls.Conn, error)
- type Cipher
- type DhKey
- type SymmCipher
- type ThirdPartCipher
Constants ¶
View Source
const ( DH_KEY_LENGTH int = 64 /* 低7位用于保存分组加密算法中的工作模式 */ WORK_MODE_MASK int = 0x007f ECB_MODE int = 0x1 CBC_MODE int = 0x2 CFB_MODE int = 0x4 OFB_MODE int = 0x8 /* 高位保存加密算法 */ ALGO_MASK int = 0xff80 DES int = 0x0080 DES3 int = 0x0100 AES128 int = 0x0200 AES192 int = 0x0400 AES256 int = 0x0800 RC4 int = 0x1000 MD5 int = 0x1100 // 用户名密码加密算法 DES_CFB int = 132 // 消息加密摘要长度 MD5_DIGEST_SIZE int = 16 MIN_EXTERNAL_CIPHER_ID int = 5000 )
Variables ¶
This section is empty.
Functions ¶
func AnyOverlap ¶
AnyOverlap reports whether x and y share memory at any (not necessarily corresponding) index. The memory beyond the slice length is ignored.
func ComputeSessionKey ¶
func InexactOverlap ¶
InexactOverlap reports whether x and y share memory at any non-corresponding index. The memory beyond the slice length is ignored. Note that x and y can have different lengths and still not have any inexact overlap.
InexactOverlap can be used to implement the requirements of the crypto/cipher AEAD, Block, BlockMode and Stream interfaces.
Types ¶
type DhKey ¶
type DhKey struct {
// contains filtered or unexported fields
}
func NewClientKeyPair ¶
func (*DhKey) GetYString ¶
func (*DhKey) IsPrivateKey ¶
type SymmCipher ¶
type SymmCipher struct {
// contains filtered or unexported fields
}
func NewSymmCipher ¶
func NewSymmCipher(algorithmID int, key []byte) (SymmCipher, error)
type ThirdPartCipher ¶
type ThirdPartCipher struct {
// contains filtered or unexported fields
}
func NewThirdPartCipher ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.