Documentation ¶
Index ¶
- Variables
- func ApplyHash(hashObject *CryptoHash, data *[]byte) error
- func CalculateHashValue(hashObject *CryptoHash, size HSize) (*[]byte, error)
- func ReleaseCSP(cryptoProvider *CryptoProvider)
- func ReleaseHashMethod(hashMethod *CryptoHash)
- type CSPException
- type CSPType
- type CalculateHashException
- type CryptoHash
- type CryptoProvider
- type GetHashException
- type HSize
- type HashMethodException
- type HashType
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CalculateHashValue ¶
func CalculateHashValue(hashObject *CryptoHash, size HSize) (*[]byte, error)
вычислить хэш
func ReleaseCSP ¶
func ReleaseCSP(cryptoProvider *CryptoProvider)
освободить экземпляр криптопровайдера
func ReleaseHashMethod ¶
func ReleaseHashMethod(hashMethod *CryptoHash)
освободить метод хэширования
Types ¶
type CSPException ¶
type CSPException struct {
// contains filtered or unexported fields
}
Исключение работы с csp
func (*CSPException) Error ¶
func (exception *CSPException) Error() string
type CSPType ¶
type CSPType int64
Тип CSP
const ( GOST2001 CSPType = C.PROV_GOST_2001_DH GOST2012_256 CSPType = C.PROV_GOST_2012_256 GOST2012_512 CSPType = C.PROV_GOST_2012_512 )
type CalculateHashException ¶
type CalculateHashException struct {
// contains filtered or unexported fields
}
Исключение вычисления хэша
func (*CalculateHashException) Error ¶
func (exception *CalculateHashException) Error() string
type CryptoHash ¶
type CryptoHash C.HCRYPTHASH
Хэш
func TakeHashMethod ¶
func TakeHashMethod(cryptoProvider *CryptoProvider, hashType HashType) (*CryptoHash, error)
получить метод хэширования
type CryptoProvider ¶
type CryptoProvider C.HCRYPTPROV
Криптопровайдер
func TakeCSP ¶
func TakeCSP(cspType CSPType) (*CryptoProvider, error)
получить экземпляр крипто провайдера
type GetHashException ¶
type GetHashException struct {
// contains filtered or unexported fields
}
исключение получения параметра хэша
func (*GetHashException) Error ¶
func (exception *GetHashException) Error() string
type HashMethodException ¶
type HashMethodException struct {
// contains filtered or unexported fields
}
Исключение получения метода хэширования
func (*HashMethodException) Error ¶
func (exception *HashMethodException) Error() string
type HashType ¶
type HashType uint
Тип хэша
const ( GOST3411 HashType = C.CALG_GR3411 GOST3411_2012_256 HashType = C.CALG_GR3411_2012_256 GOST3411_2012_512 HashType = C.CALG_GR3411_2012_512 )
Click to show internal directories.
Click to hide internal directories.