LCOV - code coverage report
Current view: top level - shared_model/cryptography/ed25519_sha3_impl - verifier.cpp (source / functions) Hit Total Coverage
Test: cleared_cor.info Lines: 4 5 80.0 %
Date: 2019-03-07 14:46:43 Functions: 1 1 100.0 %

          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

Generated by: LCOV version 1.13