24,641 questions
11
votes
3
answers
1k
views
Why would one reset local variables at the end of a C function?
Take a look at the function SHA1Transform taken from an SHA1 algorithm on Github. Assuming SHA1HANDSOFF is defined, the function looks like this:
void SHA1Transform(
uint32_t state[5],
const ...
0
votes
1
answer
90
views
Why different files produce same GNSS plots in my Python code?
I wrote a piece of Python code to read different GPS observation files (.24o) and navigation files (.24p), and generate polar plots of satellite trajectories. The goal is that the RINEX file can be ...
2
votes
3
answers
267
views
Why is a custom specialization of std::hash<std::string> allowed?
I implemented std::hash<std::string> in the usual way, by specializing the std::hash template. But then I realized that these should already be provided by the <string> header (https://www....
Advice
0
votes
4
replies
57
views
Intentionally Constructing Hash Collisions
I want a simple hashing algorithm with the following conditions:
1,) if n is a ten-digit integer, eg, 1234567890, then the hash of n will equal the hash of all (left-justified) sub-strings of n. As in,...
0
votes
1
answer
57
views
Taking advantage of memory contiguousness in HLSL
This is a bit of a slog so bare with me.
I'm currently writing a 3D S(moothed) P(article) H(ydrodynamics) simulation in Unity with a parallel HLSL backend. It's a Lagrangian method of fluid simulation,...
1
vote
0
answers
126
views
Importing hashed passwords into Keycloak
I want to create a user using a password that has already been hashed (using argon2). This is to validate the user migration process from my application's database to Keycloak.
I went to ...
Best practices
1
vote
5
replies
129
views
Predictable random number based on an input string (java)
Given an input string, I want to generate a "random" number between 0 and 1.
However given the same input string, the returned value should stay the same.
I tried something like:
Random ...
1
vote
0
answers
40
views
buildroot foces adding hash file in BR2_GLOBAL_PATCH_DIR?
I'm using buildroot 2024.02.
I set BR2_GLOBAL_PATCH_DIR+="$(BR2_EXTERNAL_MY_PATH)/patches". Its contents:
% tree /home/admin/buildroot-external-my/patches
/home/admin/buildroot-external-my/...
Advice
1
vote
14
replies
258
views
Ordered array vs. hash map in c++ (100 elements)
I need help regarding a code I want to write in c++.
I want to develop a program that receives and visualizes CAN messages on a GUI. The messages in question are about 100 distinct ID's, so we're not ...
-4
votes
1
answer
87
views
Can I determine the hashing-algorithm when knowing salt and plain-text password
I have a database-table of users including columns for password-hash and password-salt. As I am one of the users in this table I also know the plain-text password of one of these users. The salt ...
0
votes
0
answers
46
views
How to convert bitcoin genesis hex string to ascii or utf-8 string?
Hex string is from https://github.com/bitcoin/bitcoin/blob/d30f149360d10de31bd7f7369aa61ce8be0837b5/src/kernel/chainparams.cpp#L75C5-L75C206
I have tried the following Python 3 code but it doesn't ...
0
votes
0
answers
27
views
NiFi 2.4.0: Dynamically hash selected columns in Parquet records before uploading to GCS
I have a NiFi 2.4.0 pipeline:
GenerateFlowFile -> ExecuteSQLRecord -> PutGCSBucket
ExecuteSQLRecord fetches all table columns and outputs Parquet files.
I want to hash certain columns ...
0
votes
1
answer
101
views
How to convert (SQL) VARBINARY hashed password and salt columns to String for ASP.NET Core Web API
In my SQL Server legacy User table, I have the following columns (which I cannot change):
UserName: VARCHAR(50)
PasswodsHashed: VARBINARY
PasswordSalted: VARBIANRY
This table has thousands of records ...
0
votes
1
answer
98
views
Snowflake - Hash_agg comparaison issue
I have an issue when I use the function hash_agg on snowflake.
The result is different even if the data are the same in the table.
Below a data exemple
Sales id, name, price
1, Test1, 2
1, Test1, 3
1, ...
1
vote
3
answers
133
views
Why is server side password hashing not more familiar? [closed]
I'm working on a web application that has a simple login flow. My problem arises when I try to use a strong algorithm (argon2, bcrypt) for hashing the password on a limited resources AWS LightSail ...