openssl

package
v0.9.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MD5_CBLOCK = 64
	MD5_LBLOCK = MD5_CBLOCK / 4
)
View Source
const (
	LLGoFiles   = "$(pkg-config --cflags openssl): _wrap/openssl.c"
	LLGoPackage = "link: $(pkg-config --libs openssl); -lssl -lcrypto"
)
View Source
const (
	SHA_DIGEST_LENGTH = 20
	SHA_LBLOCK        = 16
	SHA_CBLOCK        = (SHA_LBLOCK * 4)
	SHA_LAST_BLOCK    = (SHA_CBLOCK - 8)

	SHA256_CBLOCK            = (SHA_LBLOCK * 4)
	SHA256_192_DIGEST_LENGTH = 24
	SHA224_DIGEST_LENGTH     = 28
	SHA256_DIGEST_LENGTH     = 32
	SHA384_DIGEST_LENGTH     = 48
	SHA512_DIGEST_LENGTH     = 64
	SHA512_CBLOCK            = (SHA_LBLOCK * 8)
)
View Source
const (
	EVP_MAX_MD_SIZE = 64 /* longest known is SHA512 */
)

Variables

This section is empty.

Functions

func BNAsc2bn added in v0.9.5

func BNAsc2bn(a **BIGNUM, str *c.Char) c.Int

int BN_asc2bn(BIGNUM **a, const char *str);

func BNDec2bn added in v0.9.5

func BNDec2bn(a **BIGNUM, str *c.Char) c.Int

int BN_dec2bn(BIGNUM **a, const char *str);

func BNHex2bn added in v0.9.5

func BNHex2bn(a **BIGNUM, str *c.Char) c.Int

int BN_hex2bn(BIGNUM **a, const char *str);

func ERRClearError added in v0.9.5

func ERRClearError()

void ERR_clear_error(void);

func ERRErrorString added in v0.9.5

func ERRErrorString(e Errno, buf *c.Char) *c.Char

ERR_error_string() generates a human-readable string representing the error code e, and places it at buf. buf must be at least 256 bytes long.

char *ERR_error_string(unsigned long e, char *buf);

func ERRLibErrorString added in v0.9.5

func ERRLibErrorString(e Errno) *c.Char

ERR_lib_error_string() and ERR_reason_error_string() return the library name and reason string respectively.

const char *ERR_lib_error_string(unsigned long e);

func ERRPrintErrorsCb added in v0.9.5

func ERRPrintErrorsCb(cb func(str *c.Char, len uintptr, u unsafe.Pointer) c.Int, u unsafe.Pointer)

void ERR_print_errors_cb(int (*cb) (const char *str, size_t len, void *u), void *u);

[pid]:error:[error code]:[library name]:[function name]:[reason string]:[filename]:[line]:[optional text message]

func ERRPrintErrorsFp added in v0.9.5

func ERRPrintErrorsFp(fp c.FilePtr)

void ERR_print_errors_fp(FILE *fp);

func ERRReasonErrorString added in v0.9.5

func ERRReasonErrorString(e Errno) *c.Char

const char *ERR_reason_error_string(unsigned long e);

func Free added in v0.9.5

func Free(ptr unsafe.Pointer)

func FreeCStr added in v0.9.5

func FreeCStr(ptr *c.Char)

func MD5

func MD5(data unsafe.Pointer, n uintptr, md *byte) *byte

OSSL_DEPRECATEDIN_3_0 unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md);

func MD5Bytes

func MD5Bytes(data []byte, md *byte) *byte

func MD5String

func MD5String(data string, md *byte) *byte

func RANDBufferWithLen added in v0.9.5

func RANDBufferWithLen(buf *byte, num c.Int) c.Int

int RAND_bytes(unsigned char *buf, int num);

func RANDBytes added in v0.9.5

func RANDBytes(buf []byte) c.Int

func RANDFileName added in v0.9.5

func RANDFileName(file *c.Char, num uintptr) *c.Char

const char *RAND_file_name(char *file, size_t num);

func RANDKeepRandomDevicesOpen added in v0.9.5

func RANDKeepRandomDevicesOpen(keep c.Int)

void RAND_keep_random_devices_open(int keep);

func RANDLoadFile added in v0.9.5

func RANDLoadFile(file *c.Char, maxBytes c.Long) c.Int

int RAND_load_file(const char *file, long max_bytes);

func RANDPoll added in v0.9.5

func RANDPoll() c.Int

int RAND_poll(void);

func RANDPrivBufferWithLen added in v0.9.5

func RANDPrivBufferWithLen(buf *byte, num c.Int) c.Int

int RAND_priv_bytes(unsigned char *buf, int num);

func RANDPrivBytes added in v0.9.5

func RANDPrivBytes(buf []byte) c.Int

func RANDSeed added in v0.9.5

func RANDSeed(buf unsafe.Pointer, num c.Int)

void RAND_seed(const void *buf, int num);

func RANDStatus added in v0.9.5

func RANDStatus() c.Int

int RAND_status(void);

func RANDWriteFile added in v0.9.5

func RANDWriteFile(file *c.Char) c.Int

int RAND_write_file(const char *file);

func RSAPrivateDecrypt added in v0.9.5

func RSAPrivateDecrypt(flen c.Int, from *byte, to *byte, rsa *RSA, padding c.Int) c.Int

func RSAPrivateEncrypt added in v0.9.5

func RSAPrivateEncrypt(flen c.Int, from *byte, to *byte, rsa *RSA, padding c.Int) c.Int

func RSAPublicDecrypt added in v0.9.5

func RSAPublicDecrypt(flen c.Int, from *byte, to *byte, rsa *RSA, padding c.Int) c.Int

func RSAPublicEncrypt added in v0.9.5

func RSAPublicEncrypt(flen c.Int, from *byte, to *byte, rsa *RSA, padding c.Int) c.Int

// next 4 return -1 on error

OSSL_DEPRECATEDIN_3_0 int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to,

RSA *rsa, int padding);

OSSL_DEPRECATEDIN_3_0 int RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to,

RSA *rsa, int padding);

OSSL_DEPRECATEDIN_3_0 int RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to,

RSA *rsa, int padding);

OSSL_DEPRECATEDIN_3_0 int RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to,

RSA *rsa, int padding);

func RSASign added in v0.9.5

func RSASign(typ c.Int, msg *byte, mlen c.Uint, sigret *byte, siglen *c.Uint, rsa *RSA) c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_sign( int type, const unsigned char *m, unsigned int m_length, unsigned char *sigret, unsigned int *siglen, RSA *rsa);

func SHA1

func SHA1(data unsafe.Pointer, n uintptr, md *byte) *byte

unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md);

func SHA1Bytes

func SHA1Bytes(data []byte, md *byte) *byte

func SHA1String

func SHA1String(data string, md *byte) *byte

func SHA224

func SHA224(data unsafe.Pointer, n uintptr, md *byte) *byte

unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md);

func SHA224Bytes

func SHA224Bytes(data []byte, md *byte) *byte

func SHA224String

func SHA224String(data string, md *byte) *byte

func SHA256

func SHA256(data unsafe.Pointer, n uintptr, md *byte) *byte

unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md);

func SHA256Bytes

func SHA256Bytes(data []byte, md *byte) *byte

func SHA256String

func SHA256String(data string, md *byte) *byte

func SHA384

func SHA384(data unsafe.Pointer, n uintptr, md *byte) *byte

unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md);

func SHA384Bytes

func SHA384Bytes(data []byte, md *byte) *byte

func SHA384String

func SHA384String(data string, md *byte) *byte

func SHA512

func SHA512(data unsafe.Pointer, n uintptr, md *byte) *byte

unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md);

func SHA512Bytes

func SHA512Bytes(data []byte, md *byte) *byte

func SHA512String

func SHA512String(data string, md *byte) *byte

Types

type BIGNUM added in v0.9.5

type BIGNUM struct {
	Unused [0]byte
}

func BNBin2bn added in v0.9.6

func BNBin2bn(s *byte, len c.Int, ret *BIGNUM) *BIGNUM

BIGNUM *BN_bin2bn(const unsigned char *s, int len, BIGNUM *ret);

func BNLebin2bn added in v0.9.6

func BNLebin2bn(s *byte, len c.Int, ret *BIGNUM) *BIGNUM

BIGNUM *BN_lebin2bn(const unsigned char *s, int len, BIGNUM *ret);

func BNMpi2bn added in v0.9.6

func BNMpi2bn(s *byte, len c.Int, ret *BIGNUM) *BIGNUM

BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);

func BNNative2bn added in v0.9.6

func BNNative2bn(s *byte, len c.Int, ret *BIGNUM) *BIGNUM

BIGNUM *BN_native2bn(const unsigned char *s, int len, BIGNUM *ret);

func BNNew added in v0.9.5

func BNNew() *BIGNUM

BIGNUM *BN_new(void);

func BNSecureNew added in v0.9.5

func BNSecureNew() *BIGNUM

BIGNUM *BN_secure_new(void);

func BNSignedBin2bn added in v0.9.6

func BNSignedBin2bn(s *byte, len c.Int, ret *BIGNUM) *BIGNUM

BIGNUM *BN_signed_bin2bn(const unsigned char *s, int len, BIGNUM *ret);

func BNSignedLebin2bn added in v0.9.6

func BNSignedLebin2bn(s *byte, len c.Int, ret *BIGNUM) *BIGNUM

BIGNUM *BN_signed_lebin2bn(const unsigned char *s, int len, BIGNUM *ret);

func BNSignedNative2bn added in v0.9.6

func BNSignedNative2bn(s *byte, len c.Int, ret *BIGNUM) *BIGNUM

BIGNUM *BN_signed_native2bn(const unsigned char *s, int len, BIGNUM *ret);

func (*BIGNUM) AbsIsWord added in v0.9.5

func (*BIGNUM) AbsIsWord(w BN_ULONG) c.Int

int BN_abs_is_word(const BIGNUM *a, const BN_ULONG w);

llgo:link (*BIGNUM).AbsIsWord C.BN_abs_is_word

func (*BIGNUM) Add added in v0.9.5

func (*BIGNUM) Add(a, b *BIGNUM) c.Int

int BN_add(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);

llgo:link (*BIGNUM).Add C.BN_add

func (*BIGNUM) AddWord added in v0.9.5

func (*BIGNUM) AddWord(w BN_ULONG) c.Int

int BN_add_word(BIGNUM *a, BN_ULONG w);

llgo:link (*BIGNUM).AddWord C.BN_add_word

func (*BIGNUM) AreCoprime added in v0.9.5

func (*BIGNUM) AreCoprime(b *BIGNUM, ctx *BN_CTX) c.Int

int BN_are_coprime(const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);

llgo:link (*BIGNUM).AreCoprime C.BN_are_coprime

func (*BIGNUM) Bn2bin added in v0.9.6

func (bn *BIGNUM) Bn2bin(to *byte) c.Int

int BN_bn2bin(const BIGNUM *a, unsigned char *to);

llgo:link (*BIGNUM).Bn2bin C.BN_bn2bin

func (*BIGNUM) Bn2binpad added in v0.9.6

func (bn *BIGNUM) Bn2binpad(to *byte, tolen c.Int) c.Int

int BN_bn2binpad(const BIGNUM *a, unsigned char *to, int tolen);

llgo:link (*BIGNUM).Bn2binpad C.BN_bn2binpad

func (*BIGNUM) Bn2dec added in v0.9.5

func (*BIGNUM) Bn2dec() *c.Char

char *BN_bn2dec(const BIGNUM *a);

llgo:link (*BIGNUM).Bn2dec C.BN_bn2dec

func (*BIGNUM) Bn2hex added in v0.9.5

func (*BIGNUM) Bn2hex() *c.Char

char *BN_bn2hex(const BIGNUM *a);

llgo:link (*BIGNUM).Bn2hex C.BN_bn2hex

func (*BIGNUM) Bn2lebinpad added in v0.9.6

func (bn *BIGNUM) Bn2lebinpad(to *byte, tolen c.Int) c.Int

int BN_bn2lebinpad(const BIGNUM *a, unsigned char *to, int tolen);

llgo:link (*BIGNUM).Bn2lebinpad C.BN_bn2lebinpad

func (*BIGNUM) Bn2mpi added in v0.9.6

func (bn *BIGNUM) Bn2mpi(to *byte) c.Int

int BN_bn2mpi(const BIGNUM *a, unsigned char *to);

llgo:link (*BIGNUM).Bn2mpi C.BN_bn2mpi

func (*BIGNUM) Bn2nativepad added in v0.9.6

func (bn *BIGNUM) Bn2nativepad(to *byte, tolen c.Int) c.Int

int BN_bn2nativepad(const BIGNUM *a, unsigned char *to, int tolen);

llgo:link (*BIGNUM).Bn2nativepad C.BN_bn2nativepad

func (*BIGNUM) CStr added in v0.9.5

func (*BIGNUM) CStr() *c.Char

llgo:link (*BIGNUM).CStr C.BN_bn2dec

func (*BIGNUM) Clear added in v0.9.5

func (*BIGNUM) Clear()

void BN_clear(BIGNUM *a);

llgo:link (*BIGNUM).Clear C.BN_clear

func (*BIGNUM) ClearBit added in v0.9.5

func (*BIGNUM) ClearBit(n c.Int) c.Int

int BN_clear_bit(BIGNUM *a, int n);

llgo:link (*BIGNUM).ClearBit C.BN_clear_bit

func (*BIGNUM) ClearFree added in v0.9.5

func (*BIGNUM) ClearFree()

void BN_clear_free(BIGNUM *a);

llgo:link (*BIGNUM).ClearFree C.BN_clear_free

func (*BIGNUM) Cmp added in v0.9.5

func (*BIGNUM) Cmp(b *BIGNUM) c.Int

int BN_cmp(const BIGNUM *a, const BIGNUM *b);

llgo:link (*BIGNUM).Cmp C.BN_cmp

func (*BIGNUM) Copy added in v0.9.5

func (*BIGNUM) Copy(b *BIGNUM) *BIGNUM

BIGNUM *BN_copy(BIGNUM *a, const BIGNUM *b);

llgo:link (*BIGNUM).Copy C.BN_copy

func (*BIGNUM) Div added in v0.9.5

func (*BIGNUM) Div(rem, m, d *BIGNUM, ctx *BN_CTX) c.Int

int BN_div(BIGNUM *dv, BIGNUM *rem, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);

llgo:link (*BIGNUM).Div C.BN_div

func (*BIGNUM) DivWord added in v0.9.5

func (*BIGNUM) DivWord(w BN_ULONG) BN_ULONG

BN_ULONG BN_div_word(BIGNUM *a, BN_ULONG w);

llgo:link (*BIGNUM).DivWord C.BN_div_word

func (*BIGNUM) Dup added in v0.9.5

func (*BIGNUM) Dup() *BIGNUM

BIGNUM *BN_dup(const BIGNUM *a);

llgo:link (*BIGNUM).Dup C.BN_dup

func (*BIGNUM) Exp added in v0.9.5

func (*BIGNUM) Exp(a, p *BIGNUM, ctx *BN_CTX) c.Int

int BN_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx);

llgo:link (*BIGNUM).Exp C.BN_exp

func (*BIGNUM) Free added in v0.9.5

func (*BIGNUM) Free()

void BN_free(BIGNUM *a);

llgo:link (*BIGNUM).Free C.BN_free

func (*BIGNUM) Gcd added in v0.9.5

func (*BIGNUM) Gcd(a, b *BIGNUM, ctx *BN_CTX) c.Int

int BN_gcd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);

llgo:link (*BIGNUM).Gcd C.BN_gcd

func (*BIGNUM) GetWord added in v0.9.5

func (*BIGNUM) GetWord() BN_ULONG

BN_ULONG BN_get_word(const BIGNUM *a);

llgo:link (*BIGNUM).GetWord C.BN_get_word

func (*BIGNUM) IsBitSet added in v0.9.5

func (*BIGNUM) IsBitSet(n c.Int) c.Int

int BN_is_bit_set(const BIGNUM *a, int n);

llgo:link (*BIGNUM).IsBitSet C.BN_is_bit_set

func (*BIGNUM) IsNegative added in v0.9.5

func (*BIGNUM) IsNegative() c.Int

* BN_is_negative returns 1 if the BIGNUM is negative

  • \param b pointer to the BIGNUM object
  • \return 1 if a < 0 and 0 otherwise

int BN_is_negative(const BIGNUM *b);

llgo:link (*BIGNUM).IsNegative C.BN_is_negative

func (*BIGNUM) IsOdd added in v0.9.5

func (*BIGNUM) IsOdd() c.Int

int BN_is_odd(const BIGNUM *a);

llgo:link (*BIGNUM).IsOdd C.BN_is_odd

func (*BIGNUM) IsOne added in v0.9.5

func (*BIGNUM) IsOne() c.Int

int BN_is_one(const BIGNUM *a);

llgo:link (*BIGNUM).IsOne C.BN_is_one

func (*BIGNUM) IsWord added in v0.9.5

func (*BIGNUM) IsWord(w BN_ULONG) c.Int

int BN_is_word(const BIGNUM *a, const BN_ULONG w);

llgo:link (*BIGNUM).IsWord C.BN_is_word

func (*BIGNUM) IsZero added in v0.9.5

func (*BIGNUM) IsZero() c.Int

int BN_is_zero(const BIGNUM *a);

llgo:link (*BIGNUM).IsZero C.BN_is_zero

func (*BIGNUM) Lshift added in v0.9.5

func (*BIGNUM) Lshift(a *BIGNUM, n c.Int) c.Int

int BN_lshift(BIGNUM *r, const BIGNUM *a, int n);

llgo:link (*BIGNUM).Lshift C.BN_lshift

func (*BIGNUM) Lshift1 added in v0.9.5

func (*BIGNUM) Lshift1(a *BIGNUM) c.Int

int BN_lshift1(BIGNUM *r, const BIGNUM *a);

llgo:link (*BIGNUM).Lshift1 C.BN_lshift1

func (*BIGNUM) ModExp added in v0.9.5

func (*BIGNUM) ModExp(a, p, m *BIGNUM, ctx *BN_CTX) c.Int

int BN_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, const BIGNUM *m, BN_CTX *ctx);

llgo:link (*BIGNUM).ModExp C.BN_mod_exp

func (*BIGNUM) ModWord added in v0.9.5

func (*BIGNUM) ModWord(w BN_ULONG) BN_ULONG

BN_ULONG BN_mod_word(const BIGNUM *a, BN_ULONG w);

llgo:link (*BIGNUM).ModWord C.BN_mod_word

func (*BIGNUM) Mul added in v0.9.5

func (*BIGNUM) Mul(r, a, b *BIGNUM, ctx *BN_CTX) c.Int

int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx);

llgo:link (*BIGNUM).Mul C.BN_mul

func (*BIGNUM) MulWord added in v0.9.5

func (*BIGNUM) MulWord(w BN_ULONG) c.Int

int BN_mul_word(BIGNUM *a, BN_ULONG w);

llgo:link (*BIGNUM).MulWord C.BN_mul_word

func (*BIGNUM) Nnmod added in v0.9.5

func (*BIGNUM) Nnmod(r, m, d *BIGNUM, ctx *BN_CTX) c.Int

int BN_nnmod(BIGNUM *r, const BIGNUM *m, const BIGNUM *d, BN_CTX *ctx);

llgo:link (*BIGNUM).Nnmod C.BN_nnmod

func (*BIGNUM) Rshift added in v0.9.5

func (*BIGNUM) Rshift(a *BIGNUM, n c.Int) c.Int

int BN_rshift(BIGNUM *r, const BIGNUM *a, int n);

llgo:link (*BIGNUM).Rshift C.BN_rshift

func (*BIGNUM) Rshift1 added in v0.9.5

func (*BIGNUM) Rshift1(a *BIGNUM) c.Int

int BN_rshift1(BIGNUM *r, const BIGNUM *a);

llgo:link (*BIGNUM).Rshift1 C.BN_rshift1

func (*BIGNUM) SetBit added in v0.9.5

func (*BIGNUM) SetBit(n c.Int) c.Int

int BN_set_bit(BIGNUM *a, int n);

llgo:link (*BIGNUM).SetBit C.BN_set_bit

func (*BIGNUM) SetNegative added in v0.9.5

func (*BIGNUM) SetNegative(n c.Int)

* BN_set_negative sets sign of a BIGNUM

  • \param b pointer to the BIGNUM object
  • \param n 0 if the BIGNUM b should be positive and a value != 0 otherwise

void BN_set_negative(BIGNUM *b, int n);

llgo:link (*BIGNUM).SetNegative C.BN_set_negative

func (*BIGNUM) SetWord added in v0.9.5

func (*BIGNUM) SetWord(w BN_ULONG) c.Int

int BN_set_word(BIGNUM *a, BN_ULONG w);

llgo:link (*BIGNUM).SetWord C.BN_set_word

func (*BIGNUM) SetZero added in v0.9.5

func (*BIGNUM) SetZero()

void BN_zero_ex(BIGNUM *a);

llgo:link (*BIGNUM).SetZero C.BN_zero_ex

func (*BIGNUM) SignedBn2bin added in v0.9.6

func (bn *BIGNUM) SignedBn2bin(to *byte, tolen c.Int) c.Int

int BN_signed_bn2bin(const BIGNUM *a, unsigned char *to, int tolen);

llgo:link (*BIGNUM).SignedBn2bin C.BN_signed_bn2bin

func (*BIGNUM) SignedBn2lebin added in v0.9.6

func (bn *BIGNUM) SignedBn2lebin(to *byte, tolen c.Int) c.Int

int BN_signed_bn2lebin(const BIGNUM *a, unsigned char *to, int tolen);

llgo:link (*BIGNUM).SignedBn2lebin C.BN_signed_bn2lebin

func (*BIGNUM) SignedBn2native added in v0.9.6

func (bn *BIGNUM) SignedBn2native(to *byte, tolen c.Int) c.Int

int BN_signed_bn2native(const BIGNUM *a, unsigned char *to, int tolen);

llgo:link (*BIGNUM).SignedBn2native C.BN_signed_bn2native

func (*BIGNUM) Sqr added in v0.9.5

func (*BIGNUM) Sqr(r, a *BIGNUM, ctx *BN_CTX) c.Int

int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx);

llgo:link (*BIGNUM).Sqr C.BN_sqr

func (*BIGNUM) Sub added in v0.9.5

func (*BIGNUM) Sub(a, b *BIGNUM) c.Int

int BN_sub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);

llgo:link (*BIGNUM).Sub C.BN_sub

func (*BIGNUM) SubWord added in v0.9.5

func (*BIGNUM) SubWord(w BN_ULONG) c.Int

int BN_sub_word(BIGNUM *a, BN_ULONG w);

llgo:link (*BIGNUM).SubWord C.BN_sub_word

func (*BIGNUM) Swap added in v0.9.5

func (*BIGNUM) Swap(b *BIGNUM)

void BN_swap(BIGNUM *a, BIGNUM *b);

llgo:link (*BIGNUM).Swap C.BN_swap

func (*BIGNUM) Uadd added in v0.9.5

func (*BIGNUM) Uadd(a, b *BIGNUM) c.Int

int BN_uadd(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);

llgo:link (*BIGNUM).Uadd C.BN_uadd

func (*BIGNUM) Ucmp added in v0.9.5

func (*BIGNUM) Ucmp(b *BIGNUM) c.Int

int BN_ucmp(const BIGNUM *a, const BIGNUM *b);

llgo:link (*BIGNUM).Ucmp C.BN_ucmp

func (*BIGNUM) Usub added in v0.9.5

func (*BIGNUM) Usub(a, b *BIGNUM) c.Int

int BN_usub(BIGNUM *r, const BIGNUM *a, const BIGNUM *b);

llgo:link (*BIGNUM).Usub C.BN_usub

type BIO added in v0.9.5

type BIO struct {
	Unused [0]byte
}

func BIONewMemBuf added in v0.9.5

func BIONewMemBuf(buf unsafe.Pointer, len c.Int) *BIO

BIO *BIO_new_mem_buf(const void *buf, int len);

func (*BIO) Free added in v0.9.5

func (*BIO) Free() c.Int

int BIO_free(BIO *a);

llgo:link (*BIO).Free C.BIO_free

func (*BIO) ReadEx added in v0.9.5

func (*BIO) ReadEx(data unsafe.Pointer, dlen uintptr, readbytes *uintptr) c.Int

int BIO_read_ex(BIO *b, void *data, size_t dlen, size_t *readbytes);

llgo:link (*BIO).ReadEx C.BIO_read_ex

func (*BIO) UpRef added in v0.9.5

func (*BIO) UpRef() c.Int

int BIO_up_ref(BIO *a);

llgo:link (*BIO).UpRef C.BIO_up_ref

func (*BIO) Write added in v0.9.5

func (*BIO) Write(data unsafe.Pointer, dlen c.Int) c.Int

int BIO_write(BIO *b, const void *data, int dlen);

llgo:link (*BIO).Write C.BIO_write

func (*BIO) WriteEx added in v0.9.5

func (*BIO) WriteEx(data unsafe.Pointer, dlen uintptr, written *uintptr) c.Int

int BIO_write_ex(BIO *b, const void *data, size_t dlen, size_t *written);

llgo:link (*BIO).WriteEx C.BIO_write_ex

type BN_CTX added in v0.9.5

type BN_CTX struct {
	Unused [0]byte
}

func BN_CTXNew added in v0.9.5

func BN_CTXNew() *BN_CTX

BN_CTX *BN_CTX_new(void);

func BN_CTXSecureNew added in v0.9.5

func BN_CTXSecureNew() *BN_CTX

BN_CTX *BN_CTX_secure_new(void);

func (*BN_CTX) End added in v0.9.6

func (*BN_CTX) End()

void BN_CTX_end(BN_CTX *ctx);

llgo:link (*BN_CTX).End C.BN_CTX_end

func (*BN_CTX) Free added in v0.9.5

func (*BN_CTX) Free()

void BN_CTX_free(BN_CTX *c);

llgo:link (*BN_CTX).Free C.BN_CTX_free

func (*BN_CTX) Get added in v0.9.6

func (*BN_CTX) Get() *BIGNUM

BIGNUM *BN_CTX_get(BN_CTX *ctx);

llgo:link (*BN_CTX).Get C.BN_CTX_get

func (*BN_CTX) Start added in v0.9.6

func (*BN_CTX) Start()

void BN_CTX_start(BN_CTX *ctx);

llgo:link (*BN_CTX).Start C.BN_CTX_start

type BN_GENCB added in v0.9.5

type BN_GENCB struct {
	Unused [0]byte
}

type BN_ULONG added in v0.9.5

type BN_ULONG = uint64

type EVP_MD added in v0.9.5

type EVP_MD struct {
	Unused [0]byte
}

func EVP_sha1 added in v0.9.5

func EVP_sha1() *EVP_MD

const EVP_MD *EVP_sha1(void)

func EVP_sha224 added in v0.9.5

func EVP_sha224() *EVP_MD

const EVP_MD *EVP_sha224(void)

func EVP_sha256 added in v0.9.5

func EVP_sha256() *EVP_MD

func EVP_sha256() *EVP_MD

func EVP_sha384 added in v0.9.5

func EVP_sha384() *EVP_MD

const EVP_MD *EVP_sha384(void)

func EVP_sha512 added in v0.9.5

func EVP_sha512() *EVP_MD

const EVP_MD *EVP_sha512(void)

func EVP_sha512_224 added in v0.9.5

func EVP_sha512_224() *EVP_MD

const EVP_MD *EVP_sha512_224(void)

func EVP_sha512_256 added in v0.9.5

func EVP_sha512_256() *EVP_MD

const EVP_MD *EVP_sha512_256(void)

type Errno added in v0.9.5

type Errno c.Ulong

-

  • The error code packs differently depending on if it records a system
  • error or an OpenSSL error. *
  • A system error packs like this (we follow POSIX and only allow positive
  • numbers that fit in an |int|): *
  • +-+-------------------------------------------------------------+
  • |1| system error number |
  • +-+-------------------------------------------------------------+ *
  • An OpenSSL error packs like this: *
  • <---------------------------- 32 bits -------------------------->
  • <--- 8 bits ---><------------------ 23 bits ----------------->
  • +-+---------------+---------------------------------------------+
  • |0| library | reason |
  • +-+---------------+---------------------------------------------+ *
  • A few of the reason bits are reserved as flags with special meaning: *
  • <5 bits-<>--------- 19 bits ----------------->
  • +-------+-+-----------------------------------+
  • | rflags| | reason |
  • +-------+-+-----------------------------------+
  • ^
  • |
  • ERR_RFLAG_FATAL = ERR_R_FATAL *
  • The reason flags are part of the overall reason code for practical
  • reasons, as they provide an easy way to place different types of
  • reason codes in different numeric ranges. *
  • The currently known reason flags are: *
  • ERR_RFLAG_FATAL Flags that the reason code is considered fatal.
  • For backward compatibility reasons, this flag
  • is also the code for ERR_R_FATAL (that reason
  • code served the dual purpose of flag and reason
  • code in one in pre-3.0 OpenSSL).
  • ERR_RFLAG_COMMON Flags that the reason code is common to all
  • libraries. All ERR_R_ macros must use this flag,
  • and no other _R_ macro is allowed to use it.

func ERRGetError added in v0.9.5

func ERRGetError() Errno

ERR_get_error returns the earliest error code from the thread's error queue and removes the entry. This function can be called repeatedly until there are no more error codes to return.

unsigned long ERR_get_error(void);

func ERRGetErrorAll added in v0.9.5

func ERRGetErrorAll(
	file **c.Char, line *c.Int, function **c.Char, data **c.Char, flags *c.Int) Errno

ERR_get_error_all() is the same as ERR_get_error(), but on success it additionally stores the filename, line number and function where the error occurred in *file, *line and *func, and also extra text and flags in *data, *flags. If any of those parameters are NULL, it will not be changed.

unsigned long ERR_get_error_all( const char **file, int *line, const char **func, const char **data, int *flags);

func ERRPeekError added in v0.9.5

func ERRPeekError() Errno

unsigned long ERR_peek_error(void);

func ERRPeekErrorAll added in v0.9.5

func ERRPeekErrorAll(
	file **c.Char, line *c.Int, function **c.Char, data **c.Char, flags *c.Int) Errno

unsigned long ERR_peek_error_all( const char **file, int *line, const char **func, const char **data, int *flags);

func ERRPeekLastError added in v0.9.5

func ERRPeekLastError() Errno

unsigned long ERR_peek_last_error(void);

func ERRPeekLastErrorAll added in v0.9.5

func ERRPeekLastErrorAll(
	file **c.Char, line *c.Int, function **c.Char, data **c.Char, flags *c.Int) Errno

unsigned long ERR_peek_last_error_all( const char **file, int *line, const char **func, const char **data, int *flags);

type HMAC_CTX added in v0.9.5

type HMAC_CTX struct {
	Unused [0]byte
}

func NewHMAC_CTX added in v0.9.5

func NewHMAC_CTX() *HMAC_CTX

OSSL_DEPRECATEDIN_3_0 HMAC_CTX *HMAC_CTX_new(void);

func (*HMAC_CTX) Copy added in v0.9.5

func (ctx *HMAC_CTX) Copy(sctx *HMAC_CTX) c.Int

OSSL_DEPRECATEDIN_3_0 __owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);

llgo:link (*HMAC_CTX).Copy C.HMAC_CTX_copy

func (*HMAC_CTX) Final added in v0.9.5

func (ctx *HMAC_CTX) Final(md *byte, len *c.Uint) c.Int

OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, unsigned int *len);

llgo:link (*HMAC_CTX).Final C.HMAC_Final

func (*HMAC_CTX) Free added in v0.9.5

func (ctx *HMAC_CTX) Free()

OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_free(HMAC_CTX *ctx);

llgo:link (*HMAC_CTX).Free C.HMAC_CTX_free

func (*HMAC_CTX) Init added in v0.9.5

func (ctx *HMAC_CTX) Init(key unsafe.Pointer, len c.Int, md *EVP_MD) c.Int

OSSL_DEPRECATEDIN_1_1_0 __owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md);

llgo:link (*HMAC_CTX).Init C.HMAC_Init

func (*HMAC_CTX) InitBytes added in v0.9.5

func (ctx *HMAC_CTX) InitBytes(key []byte, md *EVP_MD) c.Int

func (*HMAC_CTX) InitEx added in v0.9.5

func (ctx *HMAC_CTX) InitEx(key unsafe.Pointer, len c.Int, md *EVP_MD, impl unsafe.Pointer) c.Int

OSSL_DEPRECATEDIN_3_0 int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, const EVP_MD *md, ENGINE *impl);

llgo:link (*HMAC_CTX).InitEx C.HMAC_Init_ex

func (*HMAC_CTX) InitString added in v0.9.5

func (ctx *HMAC_CTX) InitString(key string, md *EVP_MD) c.Int

func (*HMAC_CTX) Reset added in v0.9.5

func (ctx *HMAC_CTX) Reset() c.Int

OSSL_DEPRECATEDIN_3_0 int HMAC_CTX_reset(HMAC_CTX *ctx);

llgo:link (*HMAC_CTX).Reset C.HMAC_CTX_reset

func (*HMAC_CTX) SetFlags added in v0.9.5

func (ctx *HMAC_CTX) SetFlags(flags c.Ulong)

OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);

llgo:link (*HMAC_CTX).SetFlags C.HMAC_CTX_set_flags

func (*HMAC_CTX) Size added in v0.9.5

func (ctx *HMAC_CTX) Size() uintptr

OSSL_DEPRECATEDIN_3_0 size_t HMAC_size(const HMAC_CTX *e);

llgo:link (*HMAC_CTX).Size C.HMAC_size

func (*HMAC_CTX) Update added in v0.9.5

func (ctx *HMAC_CTX) Update(data unsafe.Pointer, len uintptr) c.Int

OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, size_t len);

llgo:link (*HMAC_CTX).Update C.HMAC_Update

func (*HMAC_CTX) UpdateBytes added in v0.9.5

func (ctx *HMAC_CTX) UpdateBytes(data []byte) c.Int

func (*HMAC_CTX) UpdateString added in v0.9.5

func (ctx *HMAC_CTX) UpdateString(data string) c.Int

type MD5_CTX

type MD5_CTX struct {
	A, B, C, D MD5_LONG
	Nl, Nh     MD5_LONG
	Data       [MD5_LBLOCK]MD5_LONG
	Num        c.Uint
}

func (*MD5_CTX) Final

func (c *MD5_CTX) Final(md *byte) c.Int

func (*MD5_CTX) Init

func (c *MD5_CTX) Init() c.Int

OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c);

llgo:link (*MD5_CTX).Init C.MD5_Init

func (*MD5_CTX) Update

func (c *MD5_CTX) Update(data unsafe.Pointer, n uintptr) c.Int

OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len);

llgo:link (*MD5_CTX).Update C.MD5_Update

func (*MD5_CTX) UpdateBytes

func (c *MD5_CTX) UpdateBytes(data []byte) c.Int

func (*MD5_CTX) UpdateString

func (c *MD5_CTX) UpdateString(data string) c.Int

type MD5_LONG

type MD5_LONG = c.Uint

type PemPasswordCb added in v0.9.5

type PemPasswordCb func(buf *c.Char, size, rwflag c.Int, userdata unsafe.Pointer) c.Int

typedef int (*pem_password_cb)(char *buf, int size, int rwflag, void *userdata);

llgo:type C

type RSA added in v0.9.5

type RSA struct {
	Unused [0]byte
}

func PEMReadBioRSAPrivateKey added in v0.9.5

func PEMReadBioRSAPrivateKey(bp *BIO, x **RSA, cb PemPasswordCb, u unsafe.Pointer) *RSA

RSA *PEM_read_bio_RSAPrivateKey(BIO *bp, RSA **x, pem_password_cb *cb, void *u);

func RSANew added in v0.9.5

func RSANew() *RSA

OSSL_DEPRECATEDIN_3_0 RSA *RSA_new(void);

func (*RSA) Bits added in v0.9.5

func (*RSA) Bits() c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_bits(const RSA *rsa);

llgo:link (*RSA).Bits C.RSA_bits

func (*RSA) ClearFlags added in v0.9.5

func (*RSA) ClearFlags(flags c.Int)

OSSL_DEPRECATEDIN_3_0 void RSA_clear_flags(RSA *r, int flags);

llgo:link (*RSA).ClearFlags C.RSA_clear_flags

func (*RSA) Flags added in v0.9.5

func (*RSA) Flags() c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_flags(const RSA *r);

llgo:link (*RSA).Flags C.RSA_flags

func (*RSA) Free added in v0.9.5

func (*RSA) Free()

OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);

llgo:link (*RSA).Free C.RSA_free

func (*RSA) GenerateKeyEx added in v0.9.5

func (*RSA) GenerateKeyEx(bits c.Int, e *BIGNUM, cb *BN_GENCB) c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);

llgo:link (*RSA).GenerateKeyEx C.RSA_generate_key_ex

func (*RSA) GenerateMultiPrimeKey added in v0.9.5

func (*RSA) GenerateMultiPrimeKey(bits, primes c.Int, e *BIGNUM, cb *BN_GENCB) c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_generate_multi_prime_key(RSA *rsa, int bits, int primes, BIGNUM *e, BN_GENCB *cb);

llgo:link (*RSA).GenerateMultiPrimeKey C.RSA_generate_multi_prime_key

func (*RSA) GetExData added in v0.9.5

func (*RSA) GetExData(idx c.Int) unsafe.Pointer

OSSL_DEPRECATEDIN_3_0 void *RSA_get_ex_data(const RSA *r, int idx);

llgo:link (*RSA).GetExData C.RSA_get_ex_data

func (*RSA) GetVersion added in v0.9.5

func (*RSA) GetVersion() c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_get_version(RSA *r);

llgo:link (*RSA).GetVersion C.RSA_get_version

func (*RSA) SecurityBits added in v0.9.5

func (*RSA) SecurityBits() c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_security_bits(const RSA *rsa);

llgo:link (*RSA).SecurityBits C.RSA_security_bits

func (*RSA) SetExData added in v0.9.5

func (*RSA) SetExData(idx c.Int, arg unsafe.Pointer) c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_set_ex_data(RSA *r, int idx, void *arg);

llgo:link (*RSA).SetExData C.RSA_set_ex_data

func (*RSA) SetFlags added in v0.9.5

func (*RSA) SetFlags(flags c.Int)

OSSL_DEPRECATEDIN_3_0 void RSA_set_flags(RSA *r, int flags);

llgo:link (*RSA).SetFlags C.RSA_set_flags

func (*RSA) SetMethod added in v0.9.5

func (*RSA) SetMethod(meth *RSA_METHOD) c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);

llgo:link (*RSA).SetMethod C.RSA_set_method

func (*RSA) Size added in v0.9.5

func (*RSA) Size() c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_size(const RSA *rsa);

llgo:link (*RSA).Size C.RSA_size

func (*RSA) TestFlags added in v0.9.5

func (*RSA) TestFlags(flags c.Int) c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_test_flags(const RSA *r, int flags);

llgo:link (*RSA).TestFlags C.RSA_test_flags

func (*RSA) UpRef added in v0.9.5

func (*RSA) UpRef() c.Int

"up" the RSA object's reference count OSSL_DEPRECATEDIN_3_0 int RSA_up_ref(RSA *r);

llgo:link (*RSA).UpRef C.RSA_up_ref

type RSA_METHOD added in v0.9.5

type RSA_METHOD struct {
	Unused [0]byte
}

func RSAMethNew added in v0.9.5

func RSAMethNew(name *byte, flags c.Int) *RSA_METHOD

OSSL_DEPRECATEDIN_3_0 RSA_METHOD *RSA_meth_new(const char *name, int flags);

func (*RSA_METHOD) Free added in v0.9.5

func (*RSA_METHOD) Free()

OSSL_DEPRECATEDIN_3_0 void RSA_meth_free(RSA_METHOD *meth);

llgo:link (*RSA_METHOD).Free C.RSA_meth_free

func (*RSA_METHOD) SetFinish added in v0.9.5

func (*RSA_METHOD) SetFinish(finish func(rsa *RSA) c.Int) c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_meth_set_finish(RSA_METHOD *rsa, int (*finish) (RSA *rsa));

llgo:link (*RSA_METHOD).SetFinish C.RSA_meth_set_finish

func (*RSA_METHOD) SetInit added in v0.9.5

func (*RSA_METHOD) SetInit(init func(rsa *RSA) c.Int) c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_meth_set_init(RSA_METHOD *rsa, int (*init) (RSA *rsa));

llgo:link (*RSA_METHOD).SetInit C.RSA_meth_set_init

func (*RSA_METHOD) SetModExp added in v0.9.5

func (*RSA_METHOD) SetModExp(modExp func(
	r0 *BIGNUM, i *BIGNUM, rsa *RSA, ctx *BN_CTX) c.Int) c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_meth_set_mod_exp(RSA_METHOD *rsa,

int (*mod_exp) (BIGNUM *r0, const BIGNUM *i, RSA *rsa,
                BN_CTX *ctx));

llgo:link (*RSA_METHOD).SetModExp C.RSA_meth_set_mod_exp

func (*RSA_METHOD) SetPrivDec added in v0.9.5

func (*RSA_METHOD) SetPrivDec(privDec func(
	flen c.Int, from *byte, to *byte, rsa *RSA, padding c.Int) c.Int) c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_meth_set_priv_dec(RSA_METHOD *rsa,

int (*priv_dec) (int flen, const unsigned char *from,
                 unsigned char *to, RSA *rsa,
                 int padding));

llgo:link (*RSA_METHOD).SetPrivDec C.RSA_meth_set_priv_dec

func (*RSA_METHOD) SetPrivEnc added in v0.9.5

func (*RSA_METHOD) SetPrivEnc(privEnc func(
	flen c.Int, from *byte, to *byte, rsa *RSA, padding c.Int) c.Int) c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_meth_set_priv_enc(RSA_METHOD *rsa,

int (*priv_enc) (int flen, const unsigned char *from,
                 unsigned char *to, RSA *rsa,
                 int padding));

llgo:link (*RSA_METHOD).SetPrivEnc C.RSA_meth_set_priv_enc

func (*RSA_METHOD) SetPubDec added in v0.9.5

func (*RSA_METHOD) SetPubDec(pubDec func(
	flen c.Int, from *byte, to *byte, rsa *RSA, padding c.Int) c.Int) c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_meth_set_pub_dec(RSA_METHOD *rsa,

int (*pub_dec) (int flen, const unsigned char *from,
                unsigned char *to, RSA *rsa,
                int padding));

llgo:link (*RSA_METHOD).SetPubDec C.RSA_meth_set_pub_dec

func (*RSA_METHOD) SetPubEnc added in v0.9.5

func (*RSA_METHOD) SetPubEnc(pubEnc func(
	flen c.Int, from *byte, to *byte, rsa *RSA, padding c.Int) c.Int) c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_meth_set_pub_enc(RSA_METHOD *rsa,

int (*pub_enc) (int flen, const unsigned char *from,
                unsigned char *to, RSA *rsa,
                int padding));

llgo:link (*RSA_METHOD).SetPubEnc C.RSA_meth_set_pub_enc

func (*RSA_METHOD) SetSign added in v0.9.5

func (*RSA_METHOD) SetSign(sign func(
	typ c.Int, msg *byte, mlen c.Uint,
	sigret *byte, siglen *c.Uint, rsa *RSA) c.Int) c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_meth_set_sign(RSA_METHOD *rsa,

int (*sign) (int type, const unsigned char *m,
             unsigned int m_length,
             unsigned char *sigret, unsigned int *siglen,
             const RSA *rsa));

llgo:link (*RSA_METHOD).SetSign C.RSA_meth_set_sign

func (*RSA_METHOD) SetVerify added in v0.9.5

func (*RSA_METHOD) SetVerify(verify func(
	dtype c.Int, msg *byte, mlen c.Uint,
	sigbuf *byte, siglen c.Uint, rsa *RSA) c.Int) c.Int

OSSL_DEPRECATEDIN_3_0 int RSA_meth_set_verify(RSA_METHOD *rsa,

int (*verify) (int dtype, const unsigned char *m,
               unsigned int m_length,
               const unsigned char *sigbuf,
               unsigned int siglen, const RSA *rsa));

llgo:link (*RSA_METHOD).SetVerify C.RSA_meth_set_verify

type SHA224_CTX

type SHA224_CTX SHA256_CTX

func (*SHA224_CTX) Final

func (c *SHA224_CTX) Final(md *byte) c.Int

func (*SHA224_CTX) Init

func (c *SHA224_CTX) Init() c.Int

OSSL_DEPRECATEDIN_3_0 int SHA224_Init(SHA256_CTX *c);

llgo:link (*SHA224_CTX).Init C.SHA224_Init

func (*SHA224_CTX) Update

func (c *SHA224_CTX) Update(data unsafe.Pointer, n uintptr) c.Int

OSSL_DEPRECATEDIN_3_0 int SHA224_Update(SHA256_CTX *c, const void *data, size_t len);

llgo:link (*SHA224_CTX).Update C.SHA224_Update

func (*SHA224_CTX) UpdateBytes

func (c *SHA224_CTX) UpdateBytes(data []byte) c.Int

func (*SHA224_CTX) UpdateString

func (c *SHA224_CTX) UpdateString(data string) c.Int

type SHA256_CTX

type SHA256_CTX struct {
	H          [8]SHA_LONG
	Nl, Nh     SHA_LONG
	Data       [SHA_LBLOCK]SHA_LONG
	Num, MdLen c.Uint
}

func (*SHA256_CTX) Final

func (c *SHA256_CTX) Final(md *byte) c.Int

func (*SHA256_CTX) Init

func (c *SHA256_CTX) Init() c.Int

OSSL_DEPRECATEDIN_3_0 int SHA256_Init(SHA256_CTX *c);

llgo:link (*SHA256_CTX).Init C.SHA256_Init

func (*SHA256_CTX) Transform

func (c *SHA256_CTX) Transform(data *byte)

OSSL_DEPRECATEDIN_3_0 void SHA256_Transform(SHA256_CTX *c, const unsigned char *data);

llgo:link (*SHA256_CTX).Transform C.SHA256_Transform

func (*SHA256_CTX) Update

func (c *SHA256_CTX) Update(data unsafe.Pointer, n uintptr) c.Int

OSSL_DEPRECATEDIN_3_0 int SHA256_Update(SHA256_CTX *c, const void *data, size_t len);

llgo:link (*SHA256_CTX).Update C.SHA256_Update

func (*SHA256_CTX) UpdateBytes

func (c *SHA256_CTX) UpdateBytes(data []byte) c.Int

func (*SHA256_CTX) UpdateString

func (c *SHA256_CTX) UpdateString(data string) c.Int

type SHA384_CTX

type SHA384_CTX SHA512_CTX

func (*SHA384_CTX) Final

func (c *SHA384_CTX) Final(md *byte) c.Int

func (*SHA384_CTX) Init

func (c *SHA384_CTX) Init() c.Int

OSSL_DEPRECATEDIN_3_0 int SHA384_Init(SHA512_CTX *c);

llgo:link (*SHA384_CTX).Init C.SHA384_Init

func (*SHA384_CTX) Update

func (c *SHA384_CTX) Update(data unsafe.Pointer, n uintptr) c.Int

OSSL_DEPRECATEDIN_3_0 int SHA384_Update(SHA512_CTX *c, const void *data, size_t len);

llgo:link (*SHA384_CTX).Update C.SHA384_Update

func (*SHA384_CTX) UpdateBytes

func (c *SHA384_CTX) UpdateBytes(data []byte) c.Int

func (*SHA384_CTX) UpdateString

func (c *SHA384_CTX) UpdateString(data string) c.Int

type SHA512_CTX

type SHA512_CTX struct {
	H          [8]SHA_LONG64
	N1, Nh     SHA_LONG64
	D          [SHA_LBLOCK]SHA_LONG64
	Num, MdLen c.Uint
}

func (*SHA512_CTX) Final

func (c *SHA512_CTX) Final(md *byte) c.Int

func (*SHA512_CTX) Init

func (c *SHA512_CTX) Init() c.Int

OSSL_DEPRECATEDIN_3_0 int SHA512_Init(SHA512_CTX *c);

llgo:link (*SHA512_CTX).Init C.SHA512_Init

func (*SHA512_CTX) Transform

func (c *SHA512_CTX) Transform(data *byte)

OSSL_DEPRECATEDIN_3_0 void SHA512_Transform(SHA512_CTX *c, const unsigned char *data);

llgo:link (*SHA512_CTX).Transform C.SHA512_Transform

func (*SHA512_CTX) Update

func (c *SHA512_CTX) Update(data unsafe.Pointer, n uintptr) c.Int

OSSL_DEPRECATEDIN_3_0 int SHA512_Update(SHA512_CTX *c, const void *data, size_t len);

llgo:link (*SHA512_CTX).Update C.SHA512_Update

func (*SHA512_CTX) UpdateBytes

func (c *SHA512_CTX) UpdateBytes(data []byte) c.Int

func (*SHA512_CTX) UpdateString

func (c *SHA512_CTX) UpdateString(data string) c.Int

type SHA_CTX

type SHA_CTX struct {
	H0, H1, H2, H3, H4 SHA_LONG
	Nl, Nh             SHA_LONG
	Data               [SHA_LBLOCK]SHA_LONG
	Num                c.Uint
}

func (*SHA_CTX) Final

func (c *SHA_CTX) Final(md *byte) c.Int

func (*SHA_CTX) Init

func (c *SHA_CTX) Init() c.Int

OSSL_DEPRECATEDIN_3_0 int SHA1_Init(SHA_CTX *c);

llgo:link (*SHA_CTX).Init C.SHA1_Init

func (*SHA_CTX) Transform

func (c *SHA_CTX) Transform(data *byte)

OSSL_DEPRECATEDIN_3_0 void SHA1_Transform(SHA_CTX *c, const unsigned char *data);

llgo:link (*SHA_CTX).Transform C.SHA1_Transform

func (*SHA_CTX) Update

func (c *SHA_CTX) Update(data unsafe.Pointer, n uintptr) c.Int

OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);

llgo:link (*SHA_CTX).Update C.SHA1_Update

func (*SHA_CTX) UpdateBytes

func (c *SHA_CTX) UpdateBytes(data []byte) c.Int

func (*SHA_CTX) UpdateString

func (c *SHA_CTX) UpdateString(data string) c.Int

type SHA_LONG

type SHA_LONG = c.Uint

type SHA_LONG64

type SHA_LONG64 = c.UlongLong

Directories

Path Synopsis
_demo

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL