jeroen / bcrypt

Wrapper for bcrypt in R
Other
18 stars 0 forks source link

problem with hashpw() function #4

Open Idriss0peaccel opened 5 years ago

Idriss0peaccel commented 5 years ago

Hello, I install your package and use the fonction

library(bcrypt)
pwd <- "stark"
print( hash <- hashpw(pwd, gensalt(5)) )

At first it worked but now when i use the fonction hashpwd(...) i get this error in Rstudio and by Windows: by Rstudio: Error: OpenSSL error in RAND_DRBG_instantiate: error retrieving entropy by Windows: BCryptDuplicateHash is not found in C\:Windows\system32\rsaenh.dll rsession.exe -

jeroen commented 5 years ago

Your system seems unable to generate randomness needed by gensalt. What is your sessionInfo()?

Idriss0peaccel commented 5 years ago

Thank you for taking the time,

R version 3.5.2 (2018-12-20)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=French_France.1252 
[2] LC_CTYPE=French_France.1252   
[3] LC_MONETARY=French_France.1252
[4] LC_NUMERIC=C                  
[5] LC_TIME=French_France.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods  
[7] base     

other attached packages:
[1] DBI_1.0.0

loaded via a namespace (and not attached):
 [1] bit_1.1-14      compiler_3.5.2  tools_3.5.2    
 [4] memoise_1.1.0   Rcpp_1.0.0      bit64_0.9-7    
 [7] bcrypt_1.1      RSQLite_2.1.1   blob_1.1.1     
[10] digest_0.6.18   openssl_1.2.1   pkgconfig_2.0.2
[13] askpass_1.1    
josantoslnec commented 5 years ago

Any news? This happened to me after upgrading to rstudio 1.2 on windows. Before, with Rstudio 1.1 it was working...

jeroen commented 5 years ago

Can you make sure you have the latest versions of all packages: update.packages(ask=F). Does it still happen?

josantoslnec commented 5 years ago

Thank you for your reply. They were all updated.... I removed the package and installed again and the problem was solved... Thank you once again. João

On Thu, May 2, 2019 at 11:06 AM Jeroen Ooms notifications@github.com wrote:

Can you make sure you have the latest versions of all packages: update.packages(ask=F). Does it still happen?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jeroen/bcrypt/issues/4#issuecomment-488618994, or mute the thread https://github.com/notifications/unsubscribe-auth/AL4OS3IU6CSTPCVJBRLTLZ3PTK4K7ANCNFSM4GUT6W6A .

josantoslnec commented 5 years ago

In fact, let me give you a little update. When I close and open RStudio once again, the errors happens again :(

On Thu, May 2, 2019 at 12:23 PM João Pedro Santos josantos@lnec.pt wrote:

Thank you for your reply. They were all updated.... I removed the package and installed again and the problem was solved... Thank you once again. João

On Thu, May 2, 2019 at 11:06 AM Jeroen Ooms notifications@github.com wrote:

Can you make sure you have the latest versions of all packages: update.packages(ask=F). Does it still happen?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jeroen/bcrypt/issues/4#issuecomment-488618994, or mute the thread https://github.com/notifications/unsubscribe-auth/AL4OS3IU6CSTPCVJBRLTLZ3PTK4K7ANCNFSM4GUT6W6A .

Idriss0peaccel commented 5 years ago

Hello, I cleaned my Rstudio, I install the package, it works with my example, but when I restart, I receive the same error as my first post.

josantoslnec commented 5 years ago

Same here

On Mon, May 13, 2019 at 8:11 AM Idriss0peaccel notifications@github.com wrote:

Hello, I cleaned my Rstudio, I install the package, it works with my example, but when I restart, I receive the same error as my first post.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jeroen/bcrypt/issues/4#issuecomment-491702438, or mute the thread https://github.com/notifications/unsubscribe-auth/AL4OS3IDRNSVAYHUZC5FY2TPVEH7XANCNFSM4GUT6W6A .

jeroen commented 5 years ago

So this problem originates in the OpenSSL RNG? Do you also see it when calling this directly?

openssl::rand_bytes(16)
josantoslnec commented 5 years ago

openssl::rand_bytes(16)

works fine

On Mon, May 13, 2019 at 10:19 PM Jeroen Ooms notifications@github.com wrote:

So this problem originates in the OpenSSL RNG? Do you also see it when calling this directly?

openssl::rand_bytes(16)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jeroen/bcrypt/issues/4?email_source=notifications&email_token=AL4OS3I3YSO5SHKMF7D6PRLPVHLMBA5CNFSM4GUT6W6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVJS6UI#issuecomment-491990865, or mute the thread https://github.com/notifications/unsubscribe-auth/AL4OS3J5SE3MNVOAPBZOU23PVHLMBANCNFSM4GUT6W6A .

josantoslnec commented 5 years ago

This function works but when I restart RStudio I keep having the same problem. Is there a solution?

On Tue, May 14, 2019 at 12:01 PM João Pedro Santos josantos@lnec.pt wrote:

openssl::rand_bytes(16)

works fine

On Mon, May 13, 2019 at 10:19 PM Jeroen Ooms notifications@github.com wrote:

So this problem originates in the OpenSSL RNG? Do you also see it when calling this directly?

openssl::rand_bytes(16)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/jeroen/bcrypt/issues/4?email_source=notifications&email_token=AL4OS3I3YSO5SHKMF7D6PRLPVHLMBA5CNFSM4GUT6W6KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODVJS6UI#issuecomment-491990865, or mute the thread https://github.com/notifications/unsubscribe-auth/AL4OS3J5SE3MNVOAPBZOU23PVHLMBANCNFSM4GUT6W6A .

Gresliebear commented 4 years ago

Bumping this issue

I keep having this problem with bcrypt package for hashing password

openssl::rand_bytes(16) does not work either