sha256

Implementation of Kraken API in Java

一世执手 提交于 2019-11-29 04:38:22
So I currently working on an implementation of the Kraken API for Java . I am using this sample code I found on http://pastebin.com/nHJDAbH8 . The general usage as described by Kraken ( https://www.kraken.com/help/api ) is: API-Key = API key API-Sign = Message signature using HMAC-SHA512 of ( URI path + SHA256( nonce + POST data ) ) and base64 decoded secret API key and nonce = always increasing unsigned 64 bit integer otp = two-factor password ( if two-factor enabled, otherwise not required ) however I am facing the following response: {"error":["EAPI:Invalid key"]} I already tried a couple

SHA256 in T-sql stored procedure

一笑奈何 提交于 2019-11-29 03:51:30
Is it possible to generate a SHA-256 hash of a string from a stored procedure in Sql Server 2008? For deployment reasons, I'd prefer it in TSQL. Update : SQL Server 2012 HASHBYTES() now supports SHA-256 and SHA-512 out of the box. HASHBYTES ( '<algorithm>', { @input | 'input' } ) <algorithm>::= MD2 | MD4 | MD5 | SHA | SHA1 | SHA2_256 | SHA2_512 Sure. You can do it in TSQL, but it will be much easier to implement it as a CLR Stored procedure . Here's an actual example, that simply uses the .NET Framework types: Let's Hash a BLOB inno SHA256, SHA512 in SQL SERVER 2008 OR SQL SERVER 2005! You can

How can I decrypt a HMAC?

与世无争的帅哥 提交于 2019-11-29 02:48:47
问题 I can make an HMAC using the following: var encrypt = crypto.createHmac("SHA256", secret).update(string).digest('base64'); I am trying to decrypt an encoded HMAC with the secret: var decrypt = crypto.createDecipher("SHA256", secret).update(string).final("ascii"); The following was unsuccessful. How can I decrypt a HMAC with the key? I get the following error: node-crypto : Unknown cipher SHA256 crypto.js:155 return (new Decipher).init(cipher, password); ^ Error: DecipherInit error 回答1: HMAC

Docker零基础

夙愿已清 提交于 2019-11-29 01:33:19
从Docker零基础到懂一点实践教程 版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。本文链接: https://blog.csdn.net/sch0120/article/details/53219220 Docker镜像与仓库(一) 查看和删除镜像 Docker镜像是一种使用联合加载技术实现的层叠的只读文件系统,它是容器构建的基石。Docker的镜像存储在 /var/lib/docker 目录下。通过 docker info 命令可以查看到Docker使用的存储驱动和存储的位置。 schen@scvmu01:~$ docker info Containers: 7 Running: 0 Paused: 0 Stopped: 7 Images: 1 Server Version: 1.12.1 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 19 Dirperm1 Supported: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: null overlay host bridge

SignTool Not Signing ClickOnce App Using SHA256, Only Uses SHA1

百般思念 提交于 2019-11-28 23:40:54
I'm trying to sign my clickonce app. I have an EV code signing certificate that is using SHA256. The problem is that when I sign my app using the post build commands, it seems to be using SHA1 instead of SHA256. Here is a clip of the output window: Running Code Analysis... 1> Code Analysis Complete -- 0 error(s), 0 warning(s) 1> The following certificate was selected: 1> Issued to: Certificate Subject Name Here 1> 1> Issued by: DigiCert EV Code Signing CA (SHA2) 1> 1> Expires: Thu Apr 14 06:00:00 2016 1> 1> SHA1 hash: HASH-HERE 1> 1> 1> Done Adding Additional Store 1> Successfully signed and

How to create encrypted JWT in C# using RS256 with RSA private key

笑着哭i 提交于 2019-11-28 22:24:04
问题 I am using the jose-jwt library and want to create a signed JWT in C# using the RS256 algorithm for encryption. I have no experience with cryptography, so please excuse my ignorance. I see the following example in the docs: var payload = new Dictionary<string, object>() { { "sub", "mr.x@contoso.com" }, { "exp", 1300819380 } }; var privateKey=new X509Certificate2("my-key.p12", "password", X509KeyStorageFlags.Exportable | X509KeyStorageFlags.MachineKeySet).PrivateKey as RSACryptoServiceProvider

java hmac/sha512 generation

前提是你 提交于 2019-11-28 20:58:44
I have this php code which generate a HMAC (and not a simple message digest): <?php $key = "0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF"; $binkey = pack("H*", $key); echo strtoupper(hash_hmac('sha512', "ABC", $binkey)); ?> And with ABC input its output is: 100A6A016A4B21AE120851D51C93B293D95B7D8A44B16ACBEFC2D1C9DF02B6F54FA3C2D6802E52FED5DF8652DDD244788A204682D2D1CE861FDA4E67F2792643 And I need to clone it in java. So here is my current java clone : private String generateHMAC( String datas ) { // final Charset

SHA-256 or MD5 for file integrity

南笙酒味 提交于 2019-11-28 17:44:00
I know that SHA-256 is favored over MD5 for security, etc., but, if I am to use a method to only check file integrity (that is, nothing to do with password encryption, etc.), is there any advantage of using SHA-256? Since MD5 is 128-bit and SHA-256 is 256-bit (therefore twice as big)... Would it take up to twice as long to encrypt? Where time is not of essence, like in a backup program, and file integrity is all that is needed, would anyone argue against MD5 for a different algorithm, or even suggest a different technique? Does using MD5 produce a checksum? dandan78 Both SHA256 and MDA5 are

signtool failing to dual sign SHA2 and SHA1 with timestamps

烂漫一生 提交于 2019-11-28 17:17:14
We need to dual sign our binaries with SHA1 and SHA2 using signtool.exe, our certificate supports 256-bit SHA2. Using the Windows 8 SDK's signtool: e.g.: signtool.exe sign /as /fd sha256 /t http://timestamp.verisign.com/scripts/timstamp.dll /f "certificate.pfx" /p XXXXXXX "file.dll" (where XXXXXXX is our password for the certificate) fails with the cryptic error: SignTool Error: SignedCode::Sign returned error: 0x80070057 The parameter is incorrect. SignTool Error: An error occurred while attempting to sign: file.dll Signing without a timestamp works, signing individually as SHA1 or SHA256

短信验证码接入----腾讯云

北慕城南 提交于 2019-11-28 16:09:51
最近因为公司项目需要接入短信验证码功能,在网上转了几圈,最终选定了2家公司;一家是腾讯云的短信业务,这个是收费的。另一个是Mob的短信业务,这个是免费的。 本篇文章主要是介绍腾讯云的接入,后面一章节会介绍Mob的接入方法。 腾讯云的接入文档参考地址: https://cloud.tencent.com/document/product/382/5976 参数问题和错误码等直接看文档,下面我们说说流程。 首先是需要去腾讯云注册账号,然后做个人或者公司的实名认证。通过之后再注册应用,应用也是需要通过认证来申请短信模板的; 注册地址如下: https://console.cloud.tencent.com/sms/smslist 创建应用之后如下: https://console.cloud.tencent.com/sms/smsinfo/1400248333/0 这里是应用的管理后台,可以查看很多信息。管理短信模板等。一样的是ID和key: 验证流程是,手机端生成验证码,并本地保存,好后面做验证;然后把手机号和验证码通过Http的json格式的数据发生给TX,TX校验通过之后,会把验证码发给对应手机号。TX本身是不生成验证码和做校验的。验证码生成和校验都是需要我们自己做的。手机端收到验证码之后,和之前的缓存做对比,本地判断是否验证成功。TX的作用就是一个短信息的发送