| công cụ tìm kiếm bảng dữ liệu linh kiện điện tử |
|
DEV-15573 bảng dữ liệu(PDF) 21 Page - SparkFun Electronics |
|
|
|||||||||||||||||||||||||||||
DEV-15573 bảng dữ liệu(HTML) 21 Page - SparkFun Electronics |
|
21 / 31 page ![]() //Let's create a digital signature! atecc.createSignature(message); // by default, this uses the private key securely stored and loc ked in slot 0. Well, the comments say it all, but I will mention that by sending the argument "message", we are sending a pointer to the first index (0), of the array. createSignature actually does 4 things for us under the hood: 1. Loads the message into the co-processor's memory location on the chip called tempKey . 2. Commands the co-processor to sign the contents of tempKey. 3. Receives the 64 byte signature and stores it in a public variable accessible at atecc.signature . Note, we created an instance of the ATECCX08A class with the name atecc , but you could choose something different, and then you'd need to modify how you access this signature array. 4. Prints a nice ready to compile serial debug message showing the signature. Handy for copying and pasting between code. Example 3: Verify Note: If you upload the sketch as is, then it will fail to verify. This is because the public key, message and signaure are blank. They are simply place holders at this point. Example three requires that you copy/paste three things from Example 2: public key, message and signature. Please follow along below to get a successful verification. This Example shows how to verify a signature. In order for the co-processor to do this, it needs three things: 1. Public Key (of the sender) 2. Message 3. Signature If you have just completed Example2_sign , then you should remember seeing these 3 things printed out on the serial terminal. Before uploading Example3_verify.ino , please ensure you update the public key, message and signature at the top of the sketch. Also very important: you will need to rename the publicKey[64] array at the top to publicKeyExternal[64] . This is what we will use to verify the message and signature, and so we must clarify that it is external. Before uploading Example3_Verify.ino , we encourage you to click on the .gif below and watch a couple times. This can help show exactly what to do. Copying the publicKey[64] , message[32] , and signature[64] from the output of Example2_sign.ino to operate Example3_Verify.ino . (Click to Enlarge) |
|
Link URL |
| Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không? [ DONATE ] |
Alldatasheet là | Quảng cáo | Liên lạc với chúng tôi | Chính sách bảo mật | Liên kết đến bảng dữ liệu | Trao đổi link | Tìm kiếm theo nhà sản xuất All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |