Line data Source code
1 : /**
2 : * Copyright Soramitsu Co., Ltd. All Rights Reserved.
3 : * SPDX-License-Identifier: Apache-2.0
4 : */
5 :
6 : #include "verifier.hpp"
7 : #include "cryptography/ed25519_sha3_impl/internal/ed25519_impl.hpp"
8 : #include "cryptography/ed25519_sha3_impl/internal/sha3_hash.hpp"
9 :
10 : namespace shared_model {
11 : namespace crypto {
12 : bool Verifier::verify(const Signed &signedData,
13 : const Blob &orig,
14 : const PublicKey &publicKey) {
15 16243 : return iroha::verify(
16 15717 : iroha::sha3_256(crypto::toBinaryString(orig)).to_string(),
17 15838 : iroha::pubkey_t::from_string(toBinaryString(publicKey)),
18 15756 : iroha::sig_t::from_string(toBinaryString(signedData)));
19 0 : }
20 : } // namespace crypto
21 : } // namespace shared_model
|