encryption

PayPal IPN username/password hashing, how does it work?

自作多情 提交于 2020-01-25 10:44:05
问题 I'm trying to make use of the PayPal Subscription with IPN to provide monthly billing for my customers. The IPN works fine but I am not sure how the password hashing works. username (optional) Username generated by PayPal and given to subscriber to access the subscription. 64 password (optional) Password generated by PayPal and given to subscriber to access the subscription (password will be encrypted). My understanding was that I need to 'hash' the real password and then compare it with the

Trying to encrypt a random key for password reset functionality

北城以北 提交于 2020-01-25 10:06:30
问题 I am trying to encrypt a random token to be stored in the user table when a user uses the forgot password field by entering their username. It will also send out an e-mail with a url to the change user password page. This url will have a query string param called 'key'. i.e. www.mysite.com/Changepassword?key=xfsdfsdffsdfiughjksdf . Once the user clicks the link and they are on this page. I have a function that will get a user by ResetToken. If it finds a user then proceed. I need advice on a

Trying to encrypt a random key for password reset functionality

痞子三分冷 提交于 2020-01-25 10:05:29
问题 I am trying to encrypt a random token to be stored in the user table when a user uses the forgot password field by entering their username. It will also send out an e-mail with a url to the change user password page. This url will have a query string param called 'key'. i.e. www.mysite.com/Changepassword?key=xfsdfsdffsdfiughjksdf . Once the user clicks the link and they are on this page. I have a function that will get a user by ResetToken. If it finds a user then proceed. I need advice on a

Encryption in C using a Caesar Cipher

独自空忆成欢 提交于 2020-01-25 09:34:06
问题 I have been asked to create a program where I have to encrypt multiple pieces of information using a Caesar Cipher. I understand the concept behind it but what I'm having trouble visually is how to enter pieces of data within the function. For example, I have encrypted passwords saved in a file ("hrkk1" meaning "pass1" and so on). I have to create a cipher function to read the input from a scanf and strcmp so it matches what's in the file allowing the user to login. Whats the best way to

The values of operands in TEA algorithm will not get decrypted correctly in Assembly

风流意气都作罢 提交于 2020-01-25 07:29:08
问题 I'm writing an assembly project to perform Tiny Encryption algorithm. I followed the C-Code on Wikipedia and transformed it into x86 assembly. However when I run the algorithm the inputs v0 and v1, they get transformed into gibberish as they should, however, when I try to decrypt the ciphertext, I don't get the original back. Here is the encryption procedure encrypt PROC xor eax, eax xor ebx, ebx xor ecx, ecx xor edx, edx xor esi, esi xor edi, edi mov ecx, 32 LOOP1: ;sum+= delta mov eax, sum

How can I reload or update a new CA.pem file into the existing SSL CTX avoiding X509_STORE_add_cert:cert already in hash table exception

让人想犯罪 __ 提交于 2020-01-25 06:42:07
问题 I have an established SSL connection. My context is loaded with trustchain.pem file which contains all the CA info. During runtime, I am adding a new CA.pem When this addition is made the existing rustchain.pem is reloaded and the new file is taken into its list. Now if I add the new trustchain.pem file into the SSL_CTX using SSL API SSL_CTX_load_verify_locations(ctx,CAFile,CAPath) I receive: Error Exception occurred message is error:0B07C065:x509 certificate routines:X509_STORE_add_cert:cert

Windows batch script nested for loop pass current filename from innerloop to another command

风流意气都作罢 提交于 2020-01-25 06:41:28
问题 Really struggling with double quotes, double percent signs etc in batch script. So i have a folder, lets call it C:\EncryptedFiles It can have one or more subfolders, and each subfolder can have one or more encrypted file (with extension gpg). I need to look at everything inside C:\EncyptedFiles folder and iterate over files in each subfolder, and decrypt those files in same place where encrypted file is there. So if we have another folder called Subfolder1 with file EncryptedFile1.csv.gpg,

PyCryptodome Error: MAC Check Failed

大憨熊 提交于 2020-01-25 06:41:07
问题 I am working on an encryption program with Pycryptodome in Python 3. I am trying to encrypt a (byte) string and then decrypt it and verify the MAC tag. When I get to verify it, an error is thrown. This is the code: from Crypto.Cipher import AES from Crypto.Random import get_random_bytes aes_key = get_random_bytes(24) aes_cipher = AES.new(aes_key, AES.MODE_GCM) encrypted, MACtag = aes_cipher.encrypt_and_digest(b"A random thirty two byte string.") # Imagine this is happening somewhere else new

PyCryptodome Error: MAC Check Failed

丶灬走出姿态 提交于 2020-01-25 06:40:46
问题 I am working on an encryption program with Pycryptodome in Python 3. I am trying to encrypt a (byte) string and then decrypt it and verify the MAC tag. When I get to verify it, an error is thrown. This is the code: from Crypto.Cipher import AES from Crypto.Random import get_random_bytes aes_key = get_random_bytes(24) aes_cipher = AES.new(aes_key, AES.MODE_GCM) encrypted, MACtag = aes_cipher.encrypt_and_digest(b"A random thirty two byte string.") # Imagine this is happening somewhere else new

Problem with decrypting xml document

本秂侑毒 提交于 2020-01-25 05:49:26
问题 I have written some code that has encrypted an XML config file containing user credentials, and also the code to decrypt that file. When I run the encryption and decryption together on my local machine it works as expected. However, when I deploy the program, with only the decrypt code, the xml file will not decrypt. I get a cryptographic Exception: Bad Data? Here is my code: public static void Encrypt(XmlDocument Doc, string ElementToEncrypt, string EncryptionElementID, RSA Alg, string