I am trying to encrypt the stars on my server and sending it to my iPhone.
When I'm encrypting on my iPhone and it has been sent to a decryption on my server, everything is fine.
But when I'm trying to encrypt my server ( Example: When I encrypt "true" on my PHP, I am getting: ca 82 66 c 8 ho 5a a 9fb d 8 7f 25 B6 1f 0fb68 54 72 75 65 0 0 0 0 0 0 0 0 0 0 0 Then I am doing something - Base 64 yoJmyL5aqfvYfyW2HvD7aA == When IM is sending to my iPhone then I can not decrypt it correctly .. But when I encrypt "true" on my iPhone I am trying: ca 82 66 c8 ho 5 a 9fb d 8 7f25b6 1fffb 68 54 72 75 65 cccccccccccc base64 - fwqkKsopev3Xmu4BF4OE5Q == Can someone do me a Direct to the solution? The difference is the padding PHP solution does not have a standardized padding mechanism. Instead, it uses zero-padding, which ends with a string of plaintext bytes with plain text as You should read the pad in the PDP before encryption, just like the CCC crypt. Ckapet uses a good standardized padding mode called PKCS # 7 padding. This mode is always the same as the number of pad 1 to 16 (blowsize) bytes byte, the number of padding bytes. In your example this is hexadecimals in How to PAD / Unpad in PHP Padding / unpadding is always done on raw plain text, never on ciphertext. Note that your ciphertext has probably been fixed with IV values already. These first 16 bytes should not be decrypted. They should be used as the fourth and omitted by decrypt functions. Normally a new IV value must be created for each encryption. Otherwise, you will be able to see if the beginning of the plain text is like the first one. Random IV changes the whole cipher text for each encryption. php page ) I can not decrypt it on my iPhone.
trim > Or
right_trim method for that matter).
0C h, or 12 padding bytes.
No comments:
Post a Comment