Documentation ¶
Overview ¶
* * VISS-MANAGER: utils * * Copyright (C) 2022 NICS Lab, University of Malaga * Author: Jose Jesus Sanchez Gomez, sanchezg@lcc.uma.es * * This program and all files in the repository at https://github.com/josesnchz/viss-manager * are distributed following the terms of the LICENSE file in the repository. * *
Index ¶
- func AESCTRDecoding(key string, data string) (string, error)
- func AESCTREncoding(key string, data string) (string, error)
- func EcdsaGenP256() *ecdsa.PrivateKey
- func EcdsaPemDecode(pemKey string) *ecdsa.PrivateKey
- func EcdsaPemPrivEncode(privKey *ecdsa.PrivateKey) string
- func EcdsaPemPubEncode(privKey *ecdsa.PrivateKey) string
- func EcdsaSign(toSign string, privKey *ecdsa.PrivateKey) string
- func JWKThumbprint(pubKey crypto.PublicKey) string
- func JsonRecursiveMarshall(key string, value string, jplain *string)
- func Log(typ string, data string)
- func Print(data string)
- func PrintErr(err interface{})
- func RsaGen2048() *rsa.PrivateKey
- func RsaPemDecode(pemKey string) *rsa.PrivateKey
- func RsaPemPrivEncode(privKey *rsa.PrivateKey) string
- func RsaPemPubEncode(privKey *rsa.PrivateKey) string
- func RsaSign(toSign string, privKey *rsa.PrivateKey) string
- type JWK
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EcdsaPemDecode ¶
func EcdsaPemDecode(pemKey string) *ecdsa.PrivateKey
Gets ecdsa key in pem format and decodes it into ecdsa.privatekey
func EcdsaPemPrivEncode ¶
func EcdsaPemPrivEncode(privKey *ecdsa.PrivateKey) string
Returns given ECDSA private key in PEM format
func EcdsaPemPubEncode ¶
func EcdsaPemPubEncode(privKey *ecdsa.PrivateKey) string
Returns given ECDSA public key in PEM format
func EcdsaSign ¶
func EcdsaSign(toSign string, privKey *ecdsa.PrivateKey) string
Returns base 64 RS256 signature of given string using the key
func JWKThumbprint ¶
func JsonRecursiveMarshall ¶
Gets Json string (or nothing) and adds received key and value, if it doesnt receive a value or key, it does nothing
func RsaPemDecode ¶
func RsaPemDecode(pemKey string) *rsa.PrivateKey
Gets rsa key in pem format and decodes it into rsa.privatekey
func RsaPemPrivEncode ¶
func RsaPemPrivEncode(privKey *rsa.PrivateKey) string
Returns given RSA private key in PEM format
func RsaPemPubEncode ¶
func RsaPemPubEncode(privKey *rsa.PrivateKey) string
Returns given RSA public key in PEM format