Documentation ¶
Index ¶
- func AlignNextTime(base time.Time, interval time.Duration, offset time.Duration) time.Time
- func Base64Decode(enc *base64.Encoding, data []byte) ([]byte, error)
- func Base64Encode(enc *base64.Encoding, data []byte) []byte
- func GenerateRsaKey(bits int) (publicKey, privateKey []byte, err error)
- func HashData(hash crypto.Hash, datas ...[]byte) ([]byte, error)
- func HashDataSilently(hash crypto.Hash, datas ...[]byte) []byte
- func NewHash(hash crypto.Hash) (hash.Hash, error)
- func ParseNetloc(loc string, defaultAddr string, defaultPort int) (addr string, port int, err error)
- func Pkcs5Padding(data []byte, blockSize int) []byte
- func Pkcs5Unpadding(data []byte) []byte
- type AesCipher
- type CookieNotFoundError
- type EnvironmentVariableNotFoundError
- type Errors
- type NotImplementedError
- type PrivateKeyCipher
- func (c *PrivateKeyCipher) Decrypt(ciphertext []byte) ([]byte, error)
- func (c *PrivateKeyCipher) DecryptPro(ciphertext []byte, decrypter RsaDecrypter, random io.Reader) ([]byte, error)
- func (c *PrivateKeyCipher) Sign(data []byte) ([]byte, error)
- func (c *PrivateKeyCipher) SignPro(data []byte, signer RsaSigner, random io.Reader, hash crypto.Hash) ([]byte, error)
- type PublicKeyCipher
- func (c *PublicKeyCipher) Encrypt(plaintext []byte) ([]byte, error)
- func (c *PublicKeyCipher) EncryptPro(plaintext []byte, encrypter RsaEncrypter, random io.Reader) ([]byte, error)
- func (c *PublicKeyCipher) Verify(data, sign []byte) error
- func (c *PublicKeyCipher) VerifyPro(data, sign []byte, verifier RsaVerifier, hash crypto.Hash) error
- type RsaDecrypter
- type RsaEncrypter
- type RsaSigner
- type RsaVerifier
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlignNextTime ¶ added in v1.0.8
func Base64Decode ¶ added in v1.0.6
func GenerateRsaKey ¶ added in v1.0.6
func HashDataSilently ¶ added in v1.0.6
func ParseNetloc ¶ added in v1.0.11
func Pkcs5Padding ¶ added in v1.0.6
func Pkcs5Unpadding ¶ added in v1.0.6
Types ¶
type AesCipher ¶ added in v1.0.6
type AesCipher struct {
// contains filtered or unexported fields
}
type CookieNotFoundError ¶
type CookieNotFoundError struct {
// contains filtered or unexported fields
}
func NewCookieNotFoundError ¶
func NewCookieNotFoundError(name string) CookieNotFoundError
func (CookieNotFoundError) Error ¶
func (e CookieNotFoundError) Error() string
func (CookieNotFoundError) Name ¶
func (e CookieNotFoundError) Name() string
type EnvironmentVariableNotFoundError ¶
type EnvironmentVariableNotFoundError struct {
// contains filtered or unexported fields
}
func NewEnvironmentVariableNotFoundError ¶
func NewEnvironmentVariableNotFoundError(name string) EnvironmentVariableNotFoundError
func (EnvironmentVariableNotFoundError) Error ¶
func (e EnvironmentVariableNotFoundError) Error() string
func (EnvironmentVariableNotFoundError) Name ¶
func (e EnvironmentVariableNotFoundError) Name() string
type NotImplementedError ¶
type NotImplementedError struct {
// contains filtered or unexported fields
}
func NewNotImplementedError ¶
func NewNotImplementedError(hint string) NotImplementedError
func (NotImplementedError) Error ¶
func (e NotImplementedError) Error() string
type PrivateKeyCipher ¶ added in v1.0.6
type PrivateKeyCipher struct { PublicKeyCipher // contains filtered or unexported fields }
func NewPrivateKeyCipher ¶ added in v1.0.6
func NewPrivateKeyCipher(key *rsa.PrivateKey) *PrivateKeyCipher
func (*PrivateKeyCipher) Decrypt ¶ added in v1.0.6
func (c *PrivateKeyCipher) Decrypt(ciphertext []byte) ([]byte, error)
func (*PrivateKeyCipher) DecryptPro ¶ added in v1.0.6
func (c *PrivateKeyCipher) DecryptPro(ciphertext []byte, decrypter RsaDecrypter, random io.Reader) ([]byte, error)
type PublicKeyCipher ¶ added in v1.0.6
type PublicKeyCipher struct {
// contains filtered or unexported fields
}
func NewPublicKeyCipher ¶ added in v1.0.6
func NewPublicKeyCipher(key *rsa.PublicKey) *PublicKeyCipher
func (*PublicKeyCipher) Encrypt ¶ added in v1.0.6
func (c *PublicKeyCipher) Encrypt(plaintext []byte) ([]byte, error)
func (*PublicKeyCipher) EncryptPro ¶ added in v1.0.6
func (c *PublicKeyCipher) EncryptPro(plaintext []byte, encrypter RsaEncrypter, random io.Reader) ([]byte, error)
func (*PublicKeyCipher) Verify ¶ added in v1.0.6
func (c *PublicKeyCipher) Verify(data, sign []byte) error
func (*PublicKeyCipher) VerifyPro ¶ added in v1.0.6
func (c *PublicKeyCipher) VerifyPro(data, sign []byte, verifier RsaVerifier, hash crypto.Hash) error
type RsaDecrypter ¶ added in v1.0.6
type RsaEncrypter ¶ added in v1.0.6
Click to show internal directories.
Click to hide internal directories.