2,007 questions
Advice
1
vote
2
replies
56
views
get digest of saved docker image (the saved .tar file)
tl;dr Given a docker image that was saved to a local file, e.g. /tmp/my-image.tar, how do I determine the image digest (SHA256 checksum) that will match what docker expects?
Given that I save a docker ...
-1
votes
1
answer
72
views
Can Server send sha256 cert when client asks for sha384? [closed]
I have a server using openssl and I sent a connect request using openssl as:
openssl s_client -4 -connect www.google.com:443 -sigalgs rsa_pss_rsae_sha384 -tls1_2
I expected the connection to fail ...
0
votes
1
answer
117
views
Telegram login payload hash verification in Java
I am new to using Telegram and I'm trying to validate the hash provided by Telegram's initData for a webapp mini app (not the login widget) in Java, using the steps from the official Telegram ...
0
votes
1
answer
79
views
How to implement PreHash for signing
Implementing openssl command
openssl rsautl -sign -in rasi.bin -inkey riktest.key -out allkiri.bin
is based on code from answer
Converting Openssl signing to .NET6
using Org.BouncyCastle.Crypto;
...
0
votes
0
answers
71
views
Angular Material Icons Not Loading When CSP with Nonce is Applied — Fonts Blocked from style.css
I'm using Angular 12 with Content Security Policy (CSP) headers in place, including a nonce for script-src and style-src.
The app loads correctly except for Angular Material icons, which appear broken....
1
vote
0
answers
352
views
Bitunix API Signature Failure with Python
I have a code snippet I am trying to prove works and allows me to connect to the bitunix futures API. I have an idea for a bot I want to write.
Instructions for creating the signature: [https://...
2
votes
0
answers
112
views
Encrypt RSA/ECB/OAEPWithSHA-256AndMGF1Padding Swift Padding error
Backend gives us publicKey and we need to encrypt with
RSA/ECB/OAEPWithSHA-256AndMGF1Padding
and send it to server.
I am using this functions :
static func encrypt(string: String, publicKey: String?)...
0
votes
1
answer
88
views
Generating a hash for Cassandra table data
I wanted to check if there is a way to generate a hash or any kind of unique identifier for all the data in a Cassandra table at a given point of time? I can't find anything to generate a hash ...
1
vote
2
answers
136
views
Using gnu parallel to simultaneously calculate hashes
I need to calculate the SHA256 and SHA512 hashes of a very large file held in AWS S3. I need the processing to block until both computations have completed and have tried using gnu parallel to do that....
1
vote
0
answers
165
views
Hash as primary Key versus BigInt, read/write performance
I have an unlogged postgresql table holding three columns: 'key' of type varchar (255) hosting immutable sha256hex strings, 'created_at' of type timestamp without time zone and 'json' of type text.
To ...
2
votes
1
answer
117
views
creating JWT packet with C that JWT.io and google can accept
I'm looking for a native openssl solution to this and all the other suggestions did NOT help. I'm trying to make a JWT packet I can use to login to google services from within C code as I wish to ...
2
votes
0
answers
68
views
OpenSSL HMAC token creation leading to unknown seg fault
Im attempting to add some custom user access tokens to my Mongoose WS and Im generating an HMAC using OpenSSL lib to verify with. I'm using to all-in-one HMAC function provided by OpenSSL. However, *...
1
vote
0
answers
115
views
hash from openssl and MySQL for MD5 and SHA256 is different
echo -n 'yourstring' | openssl dgst -md5
MD5(stdin)= 5d7aed02367214a092f9eefed33f86d7
SELECT MD5('yourstring');
0653fc45290cd602be895bb8d054942c
echo -n 'yourdata' | openssl dgst -sha256
SHA2-256(...
2
votes
0
answers
237
views
How can you generate a SHA-256 hash from a JSONB column in Postgres?
I have a table in my Postgres DB that has a JSONB column and I want to automatically generate a SHA-256 hash of it.
CREATE TABLE IF NOT EXISTS car (
metadata JSONB,
hash TEXT GENERATED ALWAYS AS (...
0
votes
1
answer
86
views
Generating the same SHA-256 code_challenge as Postman using Java
When working on new HTTP request in Postman v11.2.14-canary01, and going to the Authorization tab and selecting SHA-256 for the Code Challenge Method and putting
...
1
vote
2
answers
981
views
Connect to OPC Ua Basic256Sha256 Security Policy with Python
I am trying to connect to an OPC Ua server to be able to read variables using a python code.
The Server and Client are on Windows Server 2022
This server has Security Policy: Basic256Sha256 , Message ...
-2
votes
1
answer
140
views
Fast ways to Sha256 hash each line in file text
I use this code
import os
import hashlib
with open('plain_text.txt') as f: # Plain text
for line in f.readlines():
line = line.rstrip("\n")
m = hashlib.sha256((line)....
0
votes
0
answers
100
views
WhatsApp payload validation fails for media types
I am using Power Platform Cloud Flows (similar to Logic Apps) to receive messages from WhatsApp through webhooks. I have created a "When an HTTP Request is received" trigger.
We are trying ...
2
votes
1
answer
602
views
Go HMAC SHA256 Webhook Signature Validation Not Working as Expected
I've been trying to implement webhook signature validation in Go, similar to a working implementation I have in Node.js. However, the Go version of my code isn't producing the correct HMAC SHA256 ...
3
votes
1
answer
642
views
Is it possible to implement Content-Security-Policy 'hash' (sha256-) header within an Angular app?
I have an Angular app that consumes a .NET 8.0 API.
Following the Content-Security-Policy (CSP) header guidelines for the HASH approach, I should create a hash for each 'inline style' to be executed (...
1
vote
1
answer
104
views
Search for text in a very large txt file (50+GB)
I have a hashes.txt file that stores strings and their compressed SHA-256 hash values. Each line in the file is formatted as follows:
<compressed_hash>:<original_string>
The ...
-3
votes
2
answers
712
views
Which implementations of hash algorithms like SHA-256 for Java are thread-safe?
I need to compute SHA-256 hashes in a Java Application.
Apaches HmacUtils seem appropriate for this. However, in the documentation it says "This class is immutable and thread-safe. However the ...
2
votes
1
answer
298
views
SHA-256 calculation in MAtlab
I'm trying to calculate a hash with Matlab to replicate a function made by a third party (not in matlab environment).
The output of the original is the same as that calculated via java, the problem is ...
0
votes
1
answer
700
views
AWS4-HMAC-SHA256 Hashing
I am working on a tiktok uploading bot. I do the same thing already with instagram so I thought I might aswell make another one for tiktok.
The only problem I run into is this key in the request ...
0
votes
0
answers
29
views
AttributeError: 'NoneType' object has no attribute 'hexdigest' with sha256 [duplicate]
#!/usr/bin/env python3
from hashlib import sha256
def produce_digest_char_by_char(word):
d=sha256();print(d.hexdigest())
for b in word:
#d=d.update(b.encode()):print(d.hexdigest())#...