From af534f22a543413e038ef85a4963af1efcb6fb3a Mon Sep 17 00:00:00 2001 From: Silke Date: Mon, 13 Mar 2017 21:23:53 +0100 Subject: [PATCH] Wrap sodium/version --- sodium/version.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 sodium/version.go diff --git a/sodium/version.go b/sodium/version.go new file mode 100644 index 0000000..5360aef --- /dev/null +++ b/sodium/version.go @@ -0,0 +1,18 @@ +package sodium + +// #cgo pkg-config: libsodium +// #include +// #include +import "C" + +func SodiumVersionString() string { + return C.GoString(C.sodium_version_string()) +} + +func SodiumLibaryVersionMajor() int { + return int(C.sodium_library_version_major()) +} + +func SodiumLibaryVersionMinor() int { + return int(C.sodium_library_version_minor()) +}