Documentation ¶
Index ¶
- func ComputeSHA3256(data []byte) []byte
- func GetRandomIndices(indiceCount, highestIndex int) []int
- func GetX509CertificateFromPEM(cert []byte) (*x509.Certificate, error)
- func IndexInSlice(array interface{}, o interface{}, equals Equals) int
- func IsLowS(k *ecdsa.PublicKey, s *big.Int) (bool, error)
- func ListSubdirs(dirPath string) ([]string, error)
- func MakeFileAbs(file, dir string) (string, error)
- func MarshalECDSASignature(r, s *big.Int) ([]byte, error)
- func PEMToX509Certs(pemCert []byte) ([]*x509.Certificate, []string, error)
- func RandomInt(n int) int
- func RandomUInt64() uint64
- func SignatureToLowS(k *ecdsa.PublicKey, signature []byte) ([]byte, error)
- func ToLowS(k *ecdsa.PublicKey, s *big.Int) (*big.Int, bool, error)
- func UnmarshalECDSASignature(raw []byte) (*big.Int, *big.Int, error)
- type ECDSASignature
- type Equals
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComputeSHA3256 ¶
ComputeSHA3256 returns SHA3-256 on data
func GetRandomIndices ¶
GetRandomIndices returns a slice of random indices from 0 to given highestIndex
func GetX509CertificateFromPEM ¶
func GetX509CertificateFromPEM(cert []byte) (*x509.Certificate, error)
GetX509CertificateFromPEM get on x509 certificate from bytes in PEM format
func IndexInSlice ¶
IndexInSlice returns the index of given object o in array
func ListSubdirs ¶
ListSubdirs returns the subdirectories
func MakeFileAbs ¶
MakeFileAbs makes 'file' absolute relative to 'dir' if not already absolute
func MarshalECDSASignature ¶
MarshalECDSASignature ...
func PEMToX509Certs ¶
func PEMToX509Certs(pemCert []byte) ([]*x509.Certificate, []string, error)
PEMToX509Certs parse PEM-encoded certs
func RandomInt ¶
RandomInt returns, as an int, a non-negative pseudo-random integer in [0,n) It panics if n <= 0
func SignatureToLowS ¶
SignatureToLowS ...
Types ¶
Click to show internal directories.
Click to hide internal directories.