hash

Unhashing a password or holding unhashed password C#

落花浮王杯 提交于 2019-12-25 19:08:13
问题 BACKGROUND I am making a personal password vault. I will be the only one that uses it and maintains it. I am doing it to practice cryptography as a personal project. WHAT WORKS I have a login page which is linked to a "Users" table in the database that stores my username and a password that has been salted and hashed. I have the method that will check what I type in the password field against the hashed/salted password within the database and that all works fine so I can log in successfully.

Getting multiple values into a hash in Perl

大憨熊 提交于 2019-12-25 18:47:10
问题 I am supposed to read in a text file with multiple values such as: maclawty796 pts/1 75-30-120-13.lig Wed Oct 12 19:27 - 19:33 maclawty796 pts/1 75-30-120-13.lig Wed Oct 12 19:35 - 19:38 hturner pts/1 tom-nilsons-macb Wed Oct 12 13:30 - 13:32 nnt pts/2 99-59-5-115.ligh Tue Oct 11 15:51 - 15:54 and turn them into totals for the month, such as: Ehowe Sep 145 minutes Ehowe Oct 38 minutes maclawty796 Sep 240 minutes maclawty796 Oct 155 minutes So far my code is: $file = 'C:\Users\user\Desktop

PBKDBF2 hash - duplicating functionality of .NET rfc2898DerivedBytes class in PHP

北战南征 提交于 2019-12-25 17:03:42
问题 I have a .NET web site built using MVC that has a user-management module. This module generates user passwords hashed conforming to the RFC2898 spec and stores them in a db. The specific implementation I'm using is the quick and convenient method found in System.Web.Helpers.Crypto.HashPassword() . Looking at the source code for that method as found here, it is wrapping a call to the Rfc2898DeriveBytes class, which actually creates the hash. So far so good. The problem I'm facing is that we

PBKDBF2 hash - duplicating functionality of .NET rfc2898DerivedBytes class in PHP

佐手、 提交于 2019-12-25 17:02:04
问题 I have a .NET web site built using MVC that has a user-management module. This module generates user passwords hashed conforming to the RFC2898 spec and stores them in a db. The specific implementation I'm using is the quick and convenient method found in System.Web.Helpers.Crypto.HashPassword() . Looking at the source code for that method as found here, it is wrapping a call to the Rfc2898DeriveBytes class, which actually creates the hash. So far so good. The problem I'm facing is that we

Methods for storing login information in database

浪子不回头ぞ 提交于 2019-12-25 14:41:33
问题 What is the best way to store login information into database? I know that storing plane text password is not at all suggested. What are the other methods? What functions in PHP are available for storing and authentication of login information if hash values of the password is used? I am using PHP, MySQL, Apache server on Windows machine. 回答1: There are two camps in this security discussion: Don't store the passwords in your DB. This usually means leveraging OAuth or equivalent. You will need

Hash and encryption in combination: Preserve security

倾然丶 夕夏残阳落幕 提交于 2019-12-25 14:11:24
问题 I would like to protect my database of secret information with a master key or master password and encrypt the data. Only if the user enters the correct master key, the data will be decrypted. Obviously, when creating the master key, I should only save this as a hash value (e.g. SHA). But then I also need a key to encrypt the data with (e.g. AES). I thought of using the master key's hash value as the key for encryption. But probably, this is not safe, right? If the user enters a key, the hash

Java集合类--HashMap

烂漫一生 提交于 2019-12-25 14:07:36
一、HashMap基本源码实现 1、HashMap基本结构 HashMap继承AbstractMap抽象类,AbstractMap实现Map接口。 public class HashMap<K,V> extends AbstractMap<K,V> implements Map<K,V>, Cloneable, Serializable { private static final long serialVersionUID = 362498820763181265L; .... } public abstract class AbstractMap<K,V> implements Map<K,V> { protected AbstractMap() { } ... } 二、HashMap的基本数据结构 jdk1.8之前,HashMap是由“数组+链表”的结构组成,jdk1.8之后,HashMap得到很大的改善;数据结构也发生了改变:“数组+链表+红黑树”;当链表节点大于8时,会转换为红黑树;否则仍然以链表结构。 头节点指的是table表上索引位置的节点,也就是链表的头节点 根节点(root节点)指的是红黑树最上面的那个节点,也就是没有父节点的节点 红黑树的根节点不一定是索引位置的头节点 转为红黑树节点后,链表的结构还存在,通过next属性维持

Is there a better way to detect endianness in .NET than BitConverter.IsLittleEndian?

北慕城南 提交于 2019-12-25 11:14:06
问题 It would be nice if the .NET framework just gave functions/methods from the BitConverter class that just explicitly returned an array of bytes in the proper requested endianness. I've done some functions like this in other code, but is there a shorter more direct way? (efficiency is key since this concept is used a TON in various crypto and password derivation contexts, including PBKDF2, Skein, HMAC, BLAKE2, AES and others) // convert an unsigned int into an array of bytes BIG ENDIEN // per

How can I extract Git commit hash from VS/msbuild?

混江龙づ霸主 提交于 2019-12-25 09:39:56
问题 The scenario is: Developers are running a PowerShell script from their machines to publish various Nuget packages to OctopusDeploy via MSBuild. We'd like to make the current git commit's hash (the base of the Git repo is the same as the .sln directory) part of the generated version number. To do this we presumably need to extract the current commit's hash and plug it into the version number string we then pass into MSBuild as a parameter. So the question is, how can we get this from MSBuild

How can I extract Git commit hash from VS/msbuild?

偶尔善良 提交于 2019-12-25 09:39:08
问题 The scenario is: Developers are running a PowerShell script from their machines to publish various Nuget packages to OctopusDeploy via MSBuild. We'd like to make the current git commit's hash (the base of the Git repo is the same as the .sln directory) part of the generated version number. To do this we presumably need to extract the current commit's hash and plug it into the version number string we then pass into MSBuild as a parameter. So the question is, how can we get this from MSBuild