sha256

Objective-C Implicit conversion loses integer precision (size_t to CC_Long)

匿名 (未验证) 提交于 2019-12-03 03:04:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a function that's generating a sha256 encryption of a string, Here's the function: -(NSString*)sha256HashFor:(NSString*)input { const char* str = [input UTF8String]; unsigned char result[CC_SHA256_DIGEST_LENGTH]; CC_SHA256(str, strlen(str), result); NSMutableString *ret = [NSMutableString stringWithCapacity:CC_SHA256_DIGEST_LENGTH*2]; for(int i = 0; i<CC_SHA256_DIGEST_LENGTH; i++) { [ret appendFormat:@"%02x",result[i]]; } return ret; } Now this line right here CC_SHA256(str, strlen(str), result); is what's producing this warning (the

PHP SHA256 and Salt won&#039;t work

匿名 (未验证) 提交于 2019-12-03 02:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to create passwords that are sha256 hashed with a $salt variable to it. But for some reason it just won't work. Been working 3 hours on this now, and I'm about to rip my head off. Here is my code: I'll try again, sorry ;o) Ok, my script worked fine, untill I tried to add the sha256 to the passwords. I got a file for creating users which is: $salt = "lollol"; $password = hash('sha256', $salt.$_POST['password']); $sql = ("INSERT INTO members (username, password, name, last_name,company)VALUES('$username', '$password', '$name', '

How do I set SSL protocol version in java? And how do I know which one? javax.net.ssl.SSLException: Received fatal alert: protocol_version

匿名 (未验证) 提交于 2019-12-03 02:54:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I am using Apache HttpClient 4.3 to interact with the API of hubic.com. My minimal reproducable example is just a one liner: HttpClientBuilder.create().build().execute(new HttpGet("https://hubic.com")); However that throws: Exception in thread "main" javax.net.ssl.SSLException: Received fatal alert: protocol_version at sun.security.ssl.Alerts.getSSLException(Alerts.java:208) at sun.security.ssl.Alerts.getSSLException(Alerts.java:154) at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1991) at sun.security.ssl.SSLSocketImpl

Algorithm negotiation fail SSH in Jenkins

匿名 (未验证) 提交于 2019-12-03 02:51:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: I'm trying to ssh from Jenkins to a local server but the following error is thrown: [ SSH ] Exception : Algorithm negotiation fail com . jcraft . jsch . JSchException : Algorithm negotiation fail at com . jcraft . jsch . Session . receive_kexinit ( Session . java : 520 ) at com . jcraft . jsch . Session . connect ( Session . java : 286 ) at com . jcraft . jsch . Session . connect ( Session . java : 150 ) at org . jvnet . hudson . plugins . SSHSite . createSession ( SSHSite . java : 141 ) at org . jvnet . hudson . plugins . SSHSite

Getting SSLHandshakeException when using Dropbox Java SDK for API v2

匿名 (未验证) 提交于 2019-12-03 02:38:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: In a XPages application I want to make use of the Dropbox Java SDK (2.1.2) for API v2 to get information about my Dropbox account. The following code is used to retrieve the corresponding account object: String atoken = "****" ; DbxRequestConfig rc = new DbxRequestConfig ( "****" ); DbxClientV2 client = new DbxClientV2 ( rc , atoken ); DbxUserUsersRequests users = client . users (); FullAccount acc = users . getCurrentAccount (); // Exception raised here The last line raises the following exception: com . dropbox . core .

HMAC SHA256 macro in Excel

匿名 (未验证) 提交于 2019-12-03 02:33:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I search ed through google, tech forums, etc.... but I couldn't find a good tutorial/guide that answer my question: I have a Cell in Excel with Text, and a Cell with a Key(both text), is there a way to have an HMAC for EXCEL function that get both cell as input and return the hmac text ? thanks in advance 回答1: A quick search on Google revealed a HMAC-SHA256 class written in VB6, located here: http://www.vbforums.com/showthread.php?635398-VB6-HMAC-SHA-256-HMAC-SHA-1-Using-Crypto-API Whilst this is for VB6 (and is native code), it should be

MQ Error on SSL enabled

匿名 (未验证) 提交于 2019-12-03 02:29:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: We have enabled SSL on 1. MQ version '7.1.0.7' 2. OS->'Linux 2.6.32-642.11.1.el6.x86_64' 3. two months back [aug-2016] and its working fine with SSL enabled and disabled mode Java Client uses 1. jdk1.7.0_21 2. Worked cipher/suite -> SSL_RSA_WITH_RC4_128_SHA <> RC4_SHA_US When I try to connect to a MQ v7.1.0.7 queue manager the application is throwing below error: com.ibm.mq.MQException: MQJE001: Completion Code '2', Reason '2397'. at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:228) at com.ibm.mq

Enabled ciphers on Ubuntu OpenJDK 7

匿名 (未验证) 提交于 2019-12-03 02:20:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I wrote the following Java program to dump the enabled ciphers in the JVM: import java.security.KeyStore; import javax.net.ssl.KeyManagerFactory; import javax.net.ssl.SSLContext; import javax.net.ssl.SSLSocket; import javax.net.ssl.TrustManagerFactory; public class ListCiphers { public static void main(String[] args) throws Exception { SSLContext ctx = SSLContext.getInstance("TLSv1"); // Create an empty TrustManagerFactory to avoid loading default CA KeyStore ks = KeyStore.getInstance("JKS"); TrustManagerFactory tmf = TrustManagerFactory

Where can I find the sha256 code of a docker image?

匿名 (未验证) 提交于 2019-12-03 02:14:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: docker pull myimage@sha256:0ecb2ad60 docker pull tomcat:7-jre8 and checked the image with inspect to see if theres a sha256 code in the metadata, but there is none (adding the sha256 code of the image would probably change the sha256 code). Do I have to compute the sha256 code of an image myself and use that? 回答1: Latest answer Edit suggested by OhJeez in the comments. docker inspect --format='{{index .RepoDigests 0}}' $IMAGE Original answer I believe you can also get this using docker inspect --format='{{.RepoDigests}}' $IMAGE Works only in

ECDHE cipher suites not supported on OpenJDK 8 installed on EC2 Linux machine

匿名 (未验证) 提交于 2019-12-03 02:13:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: When starting jetty-distribution-9.3.0.v20150612 with openjdk 1.8.0_51 running on an EC2 Amazon Linux machine, is prints that all configured ECDHE suites are not supported. 2015-08-12 16:51:20 main SslContextFactory [INFO] Cipher TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 not supported 2015-08-12 16:51:20 main SslContextFactory [INFO] Cipher TLS_DHE_RSA_WITH_CHACHA20_POLY1305_SHA256 not supported 2015-08-12 16:51:20 main SslContextFactory [INFO] Cipher TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 not supported 2015-08-12 16:51:20 main