Partager via


2.3.71 FSCTL_SET_ENCRYPTION Request

The FSCTL_SET_ENCRYPTION request sets the encryption for the file or directory associated with the given handle.<64><65>

The message contains an ENCRYPTION_BUFFER structure that indicates whether to encrypt/decrypt a file or an individual stream.

ENCRYPTION_BUFFER is defined as follows.


0


1


2


3


4


5


6


7


8


9

1
0


1


2


3


4


5


6


7


8


9

2
0


1


2


3


4


5


6


7


8


9

3
0


1

EncryptionOperation

Private

Padding

EncryptionOperation (4 bytes): A 32-bit unsigned integer value that indicates the operation to be performed. The valid values are as follows.

Value

Meaning

FILE_SET_ENCRYPTION

0x00000001

This operation requests encryption of the specified file or directory.<66>

FILE_CLEAR_ENCRYPTION

0x00000002

This operation requests removal of encryption from the specified file or directory. It MUST fail if any streams for the file are marked encrypted.<67>

STREAM_SET_ENCRYPTION

0x00000003

This operation requests encryption of the specified stream.<68>

STREAM_CLEAR_ENCRYPTION

0x00000004

This operation requests the removal of encryption from the specified stream.<69>

Private (1 byte): An 8-bit unsigned char value.<70>

Padding (3 bytes): These bytes MUST be ignored.