diff --git a/Bindings/Nettle/Cipher/CAST128.hsc b/Bindings/Nettle/Cipher/CAST128.hsc
--- a/Bindings/Nettle/Cipher/CAST128.hsc
+++ b/Bindings/Nettle/Cipher/CAST128.hsc
@@ -7,14 +7,14 @@
 #strict_import
 
 #num CAST128_BLOCK_SIZE
-#num CAST128_MIN_KEY_SIZE
-#num CAST128_MAX_KEY_SIZE
+#num CAST5_MIN_KEY_SIZE
+#num CAST5_MAX_KEY_SIZE
 #num CAST128_KEY_SIZE
 
 #starttype struct cast128_ctx
 #stoptype
 
-#ccall cast128_set_key , Ptr <struct cast128_ctx> -> CUInt -> Ptr CUChar -> IO ()
+#ccall cast5_set_key , Ptr <struct cast128_ctx> -> CUInt -> Ptr CUChar -> IO ()
+#ccall cast128_set_key , Ptr <struct cast128_ctx> -> Ptr CUChar -> IO ()
 #ccall cast128_encrypt , Ptr <struct cast128_ctx> -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ()
 #ccall cast128_decrypt , Ptr <struct cast128_ctx> -> CUInt -> Ptr CUChar -> Ptr CUChar -> IO ()
-
diff --git a/bindings-nettle.cabal b/bindings-nettle.cabal
--- a/bindings-nettle.cabal
+++ b/bindings-nettle.cabal
@@ -1,5 +1,5 @@
 name:                bindings-nettle
-version:             0.3
+version:             0.3.1
 synopsis:            bindings to nettle crypto library
 description:         partial bindings to nettle crypto library
 homepage:            http://floss.scru.org/bindings-nettle
diff --git a/test/suite.hs b/test/suite.hs
--- a/test/suite.hs
+++ b/test/suite.hs
@@ -32,14 +32,14 @@
 
 cast5_decrypt :: B.ByteString -> B.ByteString -> IO B.ByteString
 cast5_decrypt key payload = alloca $ \ctx -> allocaBytes (B.length payload) $ \buf -> withArray (map fromIntegral . B.unpack $ key) $ \k -> withArray (map fromIntegral . B.unpack $ payload) $ \src -> do
-    _ <- c'nettle_cast128_set_key ctx (fromIntegral . B.length $ key) k
+    _ <- c'nettle_cast5_set_key ctx (fromIntegral . B.length $ key) k
     _ <- c'nettle_cast128_decrypt ctx (fromIntegral . B.length $ payload) buf src
     res <- peekArray (B.length payload) buf
     return $ B.pack $ map fromIntegral res
 
 cast5_encrypt :: B.ByteString -> B.ByteString -> IO B.ByteString
 cast5_encrypt key payload = alloca $ \ctx -> allocaBytes (B.length payload) $ \buf -> withArray (map fromIntegral . B.unpack $ key) $ \k -> withArray (map fromIntegral . B.unpack $ payload) $ \src -> do
-    _ <- c'nettle_cast128_set_key ctx (fromIntegral . B.length $ key) k
+    _ <- c'nettle_cast5_set_key ctx (fromIntegral . B.length $ key) k
     _ <- c'nettle_cast128_encrypt ctx (fromIntegral . B.length $ payload) buf src
     res <- peekArray (B.length payload) buf
     return $ B.pack $ map fromIntegral res
