本文環境:
區塊鏈版本:以太坊POA聯盟鏈
節點版本: geth 1.9.19
作業系統:windows 64
合約原始碼:https://github.com/BugrahanOzturk/Ethereum-Payment-Channel-Implementation-for-IoT-Devices
本文介紹一種基于以太坊、使用智能合約驗證簽名的方法;
此種方法可以廣泛應用于物聯網等應用場景;
一、合約原始碼
// SPDX-License-Identifier: GPL-3.0
// @author : Bugrahan OZTURK
// @date : 22.08.2021
// @reference : https://solidity-by-example.org/signature/
pragma solidity ^0.7;
contract VerifySignature {
// use this function to get the hash of any string
function getHash(string memory str) public pur
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/335241.html
標籤:區塊鏈
