Home > Net >  To ask questions about c # AesCryptoServiceProvider encryption to decrypt images
To ask questions about c # AesCryptoServiceProvider encryption to decrypt images

Time:09-18

I existing Image variables of type, want to encryption, it USES the AesCryptoServiceProvider encryption, the encrypted return,
Has examined the online method is not enough to understand, hope god help me, I appreciate,

CodePudding user response:

What is the exact part of the don't understand?

CodePudding user response:

1. The encryption algorithm, was aimed at byte [], so don't tell us the Image, you should take the byte stream directly []
2. The encryption algorithm at present is common encapsulation, byte [] IV, byte [] key, to encrypt the byte [], the returned byte [] (if there is a difference between, also only is there a difference in the key generation part, such as certificates or XML signature stitching way), so you see the MSDN examples can be directly

If you still have those who do not understand, just ask

CodePudding user response:

refer to the second floor wanghui0380 response:
1. The encryption algorithm, was aimed at byte [], so don't tell us the Image, you should just take the byte stream []
2. The encryption algorithm at present is common encapsulation, byte [] IV, byte [] key, to encrypt the byte [], the returned byte [] (if there is a difference between, also only is there a difference in the key generation part, such as certificates or XML signature stitching way), so you see the MSDN examples can be directly

If you still have those who do not understand, ask the



Suppose I converts the Image type byte [] type,
Private const string m_AesIV=@! "" ABC2DES # EDC4RFV ";
Private const string m_AesKey=@ "5 eru & amp; YHN7QWE (IK<";
The Key and IV to 16 bytes,
So what to do next, I want to return the encrypted Byte [], then convert the image type,
Thank you




CodePudding user response:

reference xinminghan reply: 3/f
Quote: refer to the second floor wanghui0380 response:

1. The encryption algorithm, was aimed at byte [], so don't tell us the Image, you should take the byte stream directly []
2. The encryption algorithm at present is common encapsulation, byte [] IV, byte [] key, to encrypt the byte [], the returned byte [] (if there is a difference between, also only is there a difference in the key generation part, such as certificates or XML signature stitching way), so you see the MSDN examples can be directly

If you still have those who do not understand, ask the



Suppose I converts the Image type byte [] type,
Private const string m_AesIV=@! "" ABC2DES # EDC4RFV ";
Private const string m_AesKey=@ "5 eru & amp; YHN7QWE (IK<";


The Key and IV to 16 bytes,
So what to do next, I want to return the encrypted Byte [], then convert the image type,
Thank you





In turn not back, there are pictures of format requirements, encrypted may destroy the basic format of the images, the Image can't identify the correct format, of course you can decrypt back out to the Image

CodePudding user response:

reference 4 floor wanghui0380 response:
Quote: reference xinminghan reply: 3/f

Quote: refer to the second floor wanghui0380 response:

1. The encryption algorithm, was aimed at byte [], so don't tell us the Image, you should take the byte stream directly []
2. The encryption algorithm at present is common encapsulation, byte [] IV, byte [] key, to encrypt the byte [], the returned byte [] (if there is a difference between, also only is there a difference in the key generation part, such as certificates or XML signature stitching way), so you see the MSDN examples can be directly

If you still have those who do not understand, ask the



Suppose I converts the Image type byte [] type,
Private const string m_AesIV=@! "" ABC2DES # EDC4RFV ";
Private const string m_AesKey=@ "5 eru & amp; YHN7QWE (IK<";


The Key and IV to 16 bytes,
So what to do next, I want to return the encrypted Byte [], then convert the image type,
Thank you





In turn not back, there are pictures of format requirements, encrypted may destroy the basic format of the images, the Image can't identify the correct format, of course you can decrypt back out to Image



Is turn back or turn after unable to open, I want is the effect of the picture is encrypted to view, save I think turn JPG format, such as local is unable to open after the turn can still turn, for now is to use to encrypt AesCryptoServiceProvider,
  •  Tags:  
  • C#
  • Related