Documentation ¶
Index ¶
- func DecryptCBC(src, sKey, ivParameter string) string
- func DesencripAES(key string, text string) (string, error)
- func EncripAES(key string, text string) (string, error)
- func EncryptCBC(src, sKey, ivParameter string) string
- func GenToken(str string) string
- func GeneredHashMd5(key string) string
- func GeneredHashSha256(key string) string
- func GeneredUUID() string
- func TokenifyJwt(inputData TokenInput) (string, error)
- type TokenInput
- type TokenOutput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecryptCBC ¶
DecryptCBC : encrip AES/CBC/PKCS5Padding
func DesencripAES ¶
DesencripAES : Desencripta en aes 256 un texto donde la key es la llave noce una llave secundaria y el texto a ecriptar
func EncripAES ¶
EncripAES : Encripta en aes 256 un texto donde la key es la llave noce una llave secundaria y el texto a ecriptar
func GeneredHashMd5 ¶
GeneredHashMd5 : Genera un hash con encriptacion md5
func GeneredHashSha256 ¶
GeneredHashSha256 : Genera un hash con encriptacion sha256
func TokenifyJwt ¶ added in v1.0.2
func TokenifyJwt(inputData TokenInput) (string, error)
TokenifyJwt : crea un token con data jwt
Types ¶
type TokenInput ¶ added in v1.0.2
type TokenInput struct { //Autor o empresa Signature string //timepo a expirar si es menor o igual a 0 no expirara Expired int SecretKey string UserData map[string]interface{} AdditionalData map[string]interface{} }
TokenData : estructura para devolver un token
type TokenOutput ¶ added in v1.0.2
type TokenOutput struct { UserData map[string]interface{} `json:"userData,omitempty"` AdditionalData map[string]interface{} `json:"additionalData,omitempty"` jwt.StandardClaims }
func DetokenifyJwt ¶ added in v1.0.2
func DetokenifyJwt(tokenStr, secretKey string) (tp *TokenOutput, err error)
DetokenifyJwt : decodifica un token regresando la data correspondiente
Click to show internal directories.
Click to hide internal directories.