Documentation
¶
Index ¶
- Constants
- func AesDecrypt(encrypted string, key []byte) (string, error)
- func AesEncrypt(orig string, key []byte) (string, error)
- func CallPath(s int) string
- func PKCS5Padding(text []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) ([]byte, bool)
- func RandSeq(n int) string
- type FastLocker
- type SafeBool
Constants ¶
View Source
const (
Version = "v0.1.4"
)
Variables ¶
This section is empty.
Functions ¶
func AesDecrypt ¶ added in v0.1.4
AesDecrypt aes解密 key: 16, 24, or 32 bytes to select
func AesEncrypt ¶ added in v0.1.4
AesEncrypt aes 加密 key: 16, 24, or 32 bytes to select
func PKCS5Padding ¶ added in v0.1.4
PKCS5Padding 密文填充
func PKCS5UnPadding ¶ added in v0.1.4
PKCS5UnPadding 取消填充
Types ¶
type FastLocker ¶
type FastLocker struct {
// contains filtered or unexported fields
}
func (*FastLocker) Lock ¶
func (mu *FastLocker) Lock()
func (*FastLocker) Unlock ¶
func (mu *FastLocker) Unlock()
type SafeBool ¶
type SafeBool uint32
线程安全的标志位 set 方法保证置换操作的原子性
func (*SafeBool) ForceSetFalse ¶
func (b *SafeBool) ForceSetFalse()
func (*SafeBool) ForceSetTrue ¶
func (b *SafeBool) ForceSetTrue()
Click to show internal directories.
Click to hide internal directories.