Documentation ¶
Index ¶
- Variables
- func BytesToPrivateKey(priv []byte) (*rsa.PrivateKey, error)
- func DecryptAES(data string, key string) (string, error)
- func DecryptBytesAES(cipherText []byte, key string) ([]byte, error)
- func EncryptAES(data string, key string) (string, error)
- func EncryptBytesAES(plainText []byte, key string) ([]byte, error)
- func GetHashAlgorithm(sigAlgorithm jose.SignatureAlgorithm) (hash.Hash, error)
- func HashString(hash hash.Hash, s string, firstHalf bool) string
- func Sign(object interface{}, signer jose.Signer) (string, error)
- func SignPayload(payload []byte, signer jose.Signer) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCipherTextBlockSize = errors.New("ciphertext block size is too short")
View Source
var ErrUnsupportedAlgorithm = errors.New("unsupported signing algorithm")
Functions ¶
func BytesToPrivateKey ¶
func BytesToPrivateKey(priv []byte) (*rsa.PrivateKey, error)
func GetHashAlgorithm ¶
func SignPayload ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.