コード例 #1
0
ファイル: evp_cipher.go プロジェクト: runcom/gossl
func OpenSSLAddAllCiphers() {
	C.OpenSSL_add_all_ciphers()
}
コード例 #2
0
ファイル: evp_cipher.go プロジェクト: postfix/go-ssl
package evp

/*
#cgo pkg-config: openssl
#include "openssl/evp.h"
*/
import "C"
import "unsafe"

var Init int = func() int {
	C.OpenSSL_add_all_ciphers()
	return 1
}()

type Cipher struct {
	evp_cipher *C.EVP_CIPHER
}

func newCipher(self *C.EVP_CIPHER) *Cipher {
	if self == nil {
		return nil
	}
	return &Cipher{self}
}
func (self *Cipher) Nid() int {
	return int(C.EVP_CIPHER_nid(self.evp_cipher))
}
func (self *Cipher) BlockSize() int {
	return int(C.EVP_CIPHER_block_size(self.evp_cipher))
}
func (self *Cipher) KeyLength() int {