password-encryption

How to hide/protect password details in php?

旧时模样 提交于 2019-12-06 13:30:30
I'm making a website in which I'm trying to create a form that will send the user-input to a google spreadsheet in my google docs/drive... I found a Github project that lets people code the php... It includes 2 other php files which are needed for the script. The code is as follows: My question is, how can I hide my password from this script under $u = / $p = ?? Anyone viewing the code can see my password.. how can I prevent that? Link to the script's source is : http://www.farinspace.com/saving-form-data-to-google-spreadsheets/ <?php // Zend library include path set_include_path(get_include

Spring Security 3 + Random Salt

扶醉桌前 提交于 2019-12-06 11:09:44
So I understand that you can check a password in Spring Security with salt based on a userDetail property and then hash it to compare to a hash in the database, however what if the salt used when creating each user is random (and is stored in the DB), would I need to create my own userDetails class that contains a salt property and then set that as the field spring security uses to salt with in the securityApplicationContext? If so how would I go about writing my own userDetails class to accomplish that? Sorry still pretty new to Spring/Java. Ok but then how do I tell the

How to hide the password in the command “java -Djasypt.encryptor.password=somepassword -jar name.jar”

故事扮演 提交于 2019-12-06 09:20:16
I am using Jasypt encryption and specifying the property value within ENC() in the properties file. The decryption password is sent through the command-line argument like this java -Djasypt.encryptor.password=somepassword -jar name.jar . Everything is working fine but the problem is when I search for the running process, it shows the password as well. Is there a way to hide the encryption password as well by read it from somewhere? I thought of using the environment variables but that could also expose the password as well. So, decided against it. Update: There was a solution in another SO

Encrypt and Decrypt iOS/Node.js Security Inquiry

孤街醉人 提交于 2019-12-06 04:18:43
问题 I'm currently using AES128 on both platforms and my code from this answer Note: I changed the code a bit to deviate from using an IV because I thought it was overkill for the purpose of my application. node.js: var CryptoJS = require("crypto-js"); var crypto = require('crypto'); var password = "1234567890123456"; var salt = "gettingsaltyfoo!"; var hash = CryptoJS.SHA256(salt); var key = CryptoJS.PBKDF2(password, hash, { keySize: 256/32, iterations: 1000 }); var algorithm = 'aes128'; console

Password encoding and decoding using Spring Security, Spring Boot and MongoDB

我只是一个虾纸丫 提交于 2019-12-05 20:29:28
问题 I use the mentions software stack above and I need to encrypt password before save into database. I also need to decrypt password because when someone will change password he she needs to give in the old password and then the new onw twice and I need to check the old password. I have searched a lot but I still not sure what is the right way to do this. I have found this link Encrypting but are there other hints to do this? I also not sure if maybe MongoDB provides something to protect

node.js how to repreduce PHP MD5 encryption

半城伤御伤魂 提交于 2019-12-05 16:06:57
I'm converting an existing php based website to a node.js app, and I need to reproduce this encryption method from php to js. private static $_passwordSalt = 'd2g6IOP(U(&§)%U§VUIPU(HN%V/§§URerjh0ürfqw4zoöqe54gß0äQ"LOU$3wer'; public static function getCryptedPassword($password = 'password') { return sha1(md5(self::$_passwordSalt.$password)); } So far I've tried this but it does not return the same results: UserSchema.methods.hashPassword = function(password) { var salt = 'd2g6IOP(U(&§)%U§VUIPU(HN%V/§§URerjh0ürfqw4zoöqe54gß0äQ"LOU$3wer' var md5Hash = md5(password + salt); var

How to use password to decode a string?

天涯浪子 提交于 2019-12-05 09:34:18
问题 I have one password which needs to be travelled across network. So for the safety side I have encoded from transmitting end and doing decoding at receiving end. But my friend still able to breach password on the network because he know that how I have encoded the password string. Here is my code package org; import java.util.Base64; public class EncodingString { public static void main(String[] args){ String str = "I'm Encoding then decoding"; byte[] bytesEncoded = Base64.getEncoder().encode

How to use Spring StandardPasswordEncode and Get Salt Generate?

佐手、 提交于 2019-12-05 06:21:08
How do I encrypt a password insert it into the db and after the comparison when he will want to connect? I would use StandardPasswordEncoder Spring security 3.1.4 to encrypt my password and insert into the db. But how do I recovered the salt generated by the method? Here is an example of the doc Spring security: StandardPasswordEncoder encoder = new StandardPasswordEncoder("secret"); String result = encoder.encode("myPassword"); assertTrue(encoder.matches("myPassword", result)); I asked her because I'll need the selt order to re encode the password for the comparison? And validate if the user

How to create a PBKDF2-SHA256 password hash in C# / Bouncy Castle

最后都变了- 提交于 2019-12-05 05:21:48
I need to create a PBKDF2-SHA256 password hash, but am having some trouble. I downloaded the Bouncy Castle repo, but got a bit stuck finding what I was looking for in the Unit Tests. Found some sample code here , but this only does SHA1. The key bit of code is: /// <summary> /// Computes the PBKDF2-SHA1 hash of a password. /// </summary> /// <param name="password">The password to hash.</param> /// <param name="salt">The salt.</param> /// <param name="iterations">The PBKDF2 iteration count.</param> /// <param name="outputBytes">The length of the hash to generate, in bytes.</param> /// <returns

How to check password manually in Asp.Net identity 2?

依然范特西╮ 提交于 2019-12-05 05:13:05
This might actually be more of a conceptual question. In Asp.Net Identity the PasswordHasher generates a different hash for the same string every time you do: new PasswordHasher.HashPassword("myString"); Now if for some reason I need to manually compare a user's input to the password saved in the database, I will most probably get a different string when I hash the user's entered password, than the one that is stored in the database. Can someone please explain this to me? Shouldn't hashing the same string result in the same hash and if not, how does Identity itself realize that two different