Using an encryption dog in your project overview

Source: Internet
Author: User
Tags error code range

Today, I looked at the knowledge that was involved in the project and realized that there was a lot of knowledge in the project that I had never contacted before and sorted it out.

Encrypted dog

It is mainly used to encrypt personal important data. Our main operation is to read and write encrypted dog information.

Introduce the Sai-resistant Information Technology Co., Ltd. of the dog products, the product provided. NET unmanaged class library to complete the data reading and writing function of the encrypted dog.

Dogwrite function (write like an encrypted dog)

 [DllImport("Win32dll.dll", CharSet = CharSet.Ansi)]

    public static unsafe extern uint DogWrite(uint idogBytes, uint idogAddr, byte* pdogData);

Writes the block of data that the pdogdata points to the cryptographic dog, starting at the IDOGADDR, with a length of idogbytes.

The parameters are described below.

L IDOGADDR: The first address in the user area when the software dog reads and writes the operation. The value range is 0~99.

L Idogbytes: Byte length for software dog Read and write operation. The range of values for reading and writing is 1~100, and the sum of IDOGADDR cannot exceed 100.

L Pdogdata: pointer type variable. A data buffer that points to a read-write operation or transform.

L return Value: 0 indicates successful operation, other value is error code.

Dogread function (read the information of the encrypted dog inside)

The function reads the data from the IDOGADDR in the encrypted dog, stores the pdogdata specified buffer, and reads out the byte number as idogbytes. Remember, the buffer size is long enough.

The function declaration is as follows:

[DllImport("Win32dll.dll", CharSet = CharSet.Ansi)]

    public static unsafe extern uint DogRead(uint idogBytes, uint idogAddr, byte* pdogData);

The parameters are described below.

L IDOGADDR: The first address in the user area when the software dog reads and writes the operation. The value range is 0~99.

Idogbytes: The byte length of the read and write operation of the software dog. The range of values for reading and writing is 1~100, and the sum of IDOGADDR cannot exceed 100.

L Pdogdata: pointer type variable. A data buffer that points to a read-write operation or transform.

L return Value: 0 indicates successful operation, other value is error code.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.