JuliaCrypto / Nettle.jl

Julia wrapper around nettle cryptographic hashing/encryption library providing MD5, SHA1, SHA2 hashing and HMAC functionality, as well as AES encryption/decryption

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deprecation fix

samoconnor opened this issue · comments

diff --git a/src/hash_common.jl b/src/hash_common.jl
index 12f1679..f54a3cf 100644
--- a/src/hash_common.jl
+++ b/src/hash_common.jl
@@ -31,7 +31,7 @@ end

 # The function that maps from a NettleHash to a HashType
 function HashType(nh::NettleHash, nhptr::Ptr{Void})
-    HashType( uppercase(bytestring(nh.name)),
+    HashType( uppercase(unsafe_string(nh.name)),
                     nh.context_size, nh.digest_size, nh.block_size,
                     nh.init, nh.update, nh.digest, nhptr)

included in #71. open pull requests rather than posting patches in issues please.