Skip to content

Commit

Permalink
fix bug with SetPadding and add go.mod
Browse files Browse the repository at this point in the history
  • Loading branch information
zeebo committed Sep 5, 2018
1 parent 33d609e commit 9386dd2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ciphers.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,9 @@ func (ctx *cipherCtx) IVSize() int {
func (ctx *cipherCtx) SetPadding(pad bool) {
if pad {
C.X_EVP_CIPHER_CTX_set_padding(ctx.ctx, 1)
} else {
C.X_EVP_CIPHER_CTX_set_padding(ctx.ctx, 0)
}
C.X_EVP_CIPHER_CTX_set_padding(ctx.ctx, 0)
}

func (ctx *cipherCtx) setCtrl(code, arg int) error {
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/spacemonkeygo/openssl

require github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572 h1:RC6RW7j+1+HkWaX/Yh71Ee5ZHaHYt7ZP4sQgUrm6cDU=
github.com/spacemonkeygo/spacelog v0.0.0-20180420211403-2296661a0572/go.mod h1:w0SWMsp6j9O/dk4/ZpIhL+3CkG8ofA2vuv7k+ltqUMc=

0 comments on commit 9386dd2

Please sign in to comment.