LCOV - code coverage report
Current view: top level - shared_model/cryptography/ed25519_sha3_impl - signer.cpp (source / functions) Hit Total Coverage
Test: cleared_cor.info Lines: 8 8 100.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 "cryptography/ed25519_sha3_impl/signer.hpp"
       7             : #include "crypto/hash_types.hpp"
       8             : #include "cryptography/ed25519_sha3_impl/internal/ed25519_impl.hpp"
       9             : #include "cryptography/ed25519_sha3_impl/internal/sha3_hash.hpp"
      10             : 
      11             : namespace shared_model {
      12             :   namespace crypto {
      13             :     Signed Signer::sign(const Blob &blob, const Keypair &keypair) {
      14        6458 :       return Signed(
      15        6451 :           iroha::sign(
      16        6458 :               iroha::sha3_256(crypto::toBinaryString(blob)).to_string(),
      17        6458 :               iroha::pubkey_t::from_string(toBinaryString(keypair.publicKey())),
      18        6457 :               iroha::privkey_t::from_string(
      19        6459 :                   toBinaryString(keypair.privateKey())))
      20        6458 :               .to_string());
      21           1 :     }
      22             :   }  // namespace crypto
      23             : }  // namespace shared_model

Generated by: LCOV version 1.13