Documentation ¶
Index ¶
- Variables
- func AesDecrypt(cryptEd string, key, iv []byte) ([]byte, error)
- func AesEncrypt(origData, key, iv []byte) (string, error)
- func BytesToString(b []byte) string
- func GenRsaKey(bits int, private, public string) error
- func IsFilePathExists(path string, isFile bool) error
- func Md5sum(s string, isFile bool) (string, error)
- func PKCS5Padding(cipherText []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func RsaDecrypt(cipherText, privateKey []byte) ([]byte, error)
- func RsaEncrypt(origData, publicKey []byte) ([]byte, error)
- func SingletonFile(path string) error
- func SingletonTcp(port int) error
- func StringToBytes(s string) []byte
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrSingleton = errors.New("singleton process")
)
Functions ¶
func PKCS5Padding ¶
func PKCS5UnPadding ¶
func SingletonFile ¶
通过加锁文件实现进程单例 返回ErrSingleton表示文件被锁,已有进程在运行
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.