草庐IT

nacl-cryptography

全部标签

ruby - 无法在 Ruby-s 和 Go-s 实现之间创建相同的 scrypt 摘要

我在计算RbNaCl之间的相同scrypt摘要时遇到问题和Go'simplementation.下面是我如何使用rbnacl生成key:opslimit=2**20memlimit=2**24digest_size=32digest=RbNaCl::PasswordHash.scrypt(password,salt,opslimit,memlimit,digest_size)opslimit和memlimit参数值已从documentation中找到.这是我用Go复制相同结果的尝试:N:=32768r:=8p:=1keyLength:=32secretKeyBytes,_:=scryp

ruby - 无法在 Ruby-s 和 Go-s 实现之间创建相同的 scrypt 摘要

我在计算RbNaCl之间的相同scrypt摘要时遇到问题和Go'simplementation.下面是我如何使用rbnacl生成key:opslimit=2**20memlimit=2**24digest_size=32digest=RbNaCl::PasswordHash.scrypt(password,salt,opslimit,memlimit,digest_size)opslimit和memlimit参数值已从documentation中找到.这是我用Go复制相同结果的尝试:N:=32768r:=8p:=1keyLength:=32secretKeyBytes,_:=scryp

cryptography构建报错(Could not build wheels for cryptography)

1、问题描述:一个经常开发的python项目,在今天打包镜像的时候突然报错,报错内容如下:FailedtobuildcryptographyERROR:Couldnotbuildwheelsforcryptography,whichisrequiredtoinstallpyproject.toml-basedprojects2、排查过程:使用“Couldnotbuildwheelsforcryptography,whichisrequiredtoinstallpyproject.toml-basedprojects”去网络上搜集解决方法,都没有解决。接着,尝试重新初始化项目环境后重新打包镜像,

cryptography构建报错(Could not build wheels for cryptography)

1、问题描述:一个经常开发的python项目,在今天打包镜像的时候突然报错,报错内容如下:FailedtobuildcryptographyERROR:Couldnotbuildwheelsforcryptography,whichisrequiredtoinstallpyproject.toml-basedprojects2、排查过程:使用“Couldnotbuildwheelsforcryptography,whichisrequiredtoinstallpyproject.toml-basedprojects”去网络上搜集解决方法,都没有解决。接着,尝试重新初始化项目环境后重新打包镜像,

windows - HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Cryptography\MachineGuid 是唯一的吗?

这page说如下:IntheWindowsregistryisakeycalledMachineGUIDthathasaUUIDwhichiscreatedbyWindowsduringinstallationandshouldintheorybeuniquetothemachine.InpracticethisisnotthecaseandIhaveoftencomeacrossduplicatesofthisIDbetweenmachines.我不明白为什么它不是唯一的,我的意思是Windows是否使用了一些弱算法来生成此GUID或其他东西? 最佳答案

cryptography - Android中 "AES"密码的含义?

我继承了使用以下密码的Android代码:ks=newSecretKeySpec(key,"AES");ciph=Cipher.getInstance("AES");由于只给出了“AES”,我不知道key大小、模式和填充是什么。我查看了BouncyCaSTLe*文档,但找不到描述“AES”实例的位置。如果可以的话,我想使用更明确的实例描述(例如“AES/ECB/PCKS5Padding”)。有谁知道这个实例的key大小、模式和填充是什么?谢谢!*我读到过Android使用BouncyCaSTLe作为其默认提供程序,但我没有在任何官方网站上找到它,因此我可能会在这里做出无用的假设。

.net - 使用 System.Security.Cryptography 将 Win32 Crypto API 调用转换为 C#

我接到一项任务,要删除我们产品的一个dll并将其替换为纯C#的dll。旧的DLL是一个.NET2.0ManagedC++(C++\CLI),它包装了对Win32nativeCryptoAPI的调用。新的DLL应公开一个具有相同名称和方法的新对象,但应使用C#(.NET4.0)编写。当然,新DLL应该以与旧DLL相同的方式加密(和解密)-否则,所有保存在永久存储(如数据库或文件)中的加密密码都不会被解析!这是native(Win32)API调用的(伪)代码(注意输入始终采用Unicode编码)://buffer_to_encrypt-Istheinputtothefollowingpro

python - "cryptography is required for sha256_password or caching_sha2_password"

美好的一天。希望你一切都好。有人可以帮我解决这个问题吗?我是MySQL环境的新手。我正在尝试远程连接到MySQL数据库。我使用了以下python代码并得到了这个错误。Print(e)="cryptographyisrequiredforsha256_passwordorcaching_sha2_password"不知道如何解决错误。importpymysqlasdbHOST="XXXXX.XXX.XX”PORT=XXXXUSER="my_username"PASSWORD="my_password”DB="db_name"try:connection=db.Connection(hos

ios - Xamarin:错误 MT2002:无法解析 "System.Void System.Security.Cryptography.SHA1Cng::.ctor()"

我在构建适用于iOS的Xamarin解决方案时遇到此错误。我只启用了链接SDK程序集。奇怪的是,当我为模拟器构建它时它工作得很好,但是当我为真实设备构建它时却出现了这个错误。MTOUCH:errorMT2002:Failedtoresolve"System.VoidSystem.Security.Cryptography.SHA1Cng::.ctor()"referencefrom"System.Core,Version=4.0.0.0,Culture=neutral,PublicKeyToken=b77a5c561934e089"在我的代码中我没有提到System.Security.

使用 System.Security.Cryptography.Aes 的 AES256 加密的 C# 示例

我需要实现AES256加密/解密,但我一直无法找到可以正常工作的示例。MSDN建议我应该使用AES类。TheRijndaelclassisthepredecessoroftheAesalgorithm.YoushouldusetheAesalgorithminsteadofRijndael.Formoreinformation,seetheentryTheDifferencesBetweenRijndaelandAESinthe.NETSecurityblog.谁能给我指出一个使用AES256的AES类的好例子的方向?为了更加清晰:我有一个包含共享key和一串加密文本的密码文件。我需要