diff options
Diffstat (limited to 'src/constructs')
-rw-r--r-- | src/constructs/rfc3394/rfc3394.cpp | 4 | ||||
-rw-r--r-- | src/constructs/tss/tss.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/constructs/rfc3394/rfc3394.cpp b/src/constructs/rfc3394/rfc3394.cpp index b000873fd..db6420ff3 100644 --- a/src/constructs/rfc3394/rfc3394.cpp +++ b/src/constructs/rfc3394/rfc3394.cpp @@ -39,7 +39,7 @@ SecureVector<byte> rfc3394_keywrap(const MemoryRegion<byte>& key, if(key.size() % 8 != 0) throw std::invalid_argument("Bad input key size for NIST key wrap"); - std::auto_ptr<BlockCipher> aes(make_aes(kek.length(), af)); + std::unique_ptr<BlockCipher> aes(make_aes(kek.length(), af)); aes->set_key(kek); const size_t n = key.size() / 8; @@ -81,7 +81,7 @@ SecureVector<byte> rfc3394_keyunwrap(const MemoryRegion<byte>& key, if(key.size() < 16 || key.size() % 8 != 0) throw std::invalid_argument("Bad input key size for NIST key unwrap"); - std::auto_ptr<BlockCipher> aes(make_aes(kek.length(), af)); + std::unique_ptr<BlockCipher> aes(make_aes(kek.length(), af)); aes->set_key(kek); const size_t n = (key.size() - 8) / 8; diff --git a/src/constructs/tss/tss.cpp b/src/constructs/tss/tss.cpp index d0a18f534..cc34216f3 100644 --- a/src/constructs/tss/tss.cpp +++ b/src/constructs/tss/tss.cpp @@ -205,7 +205,7 @@ RTSS_Share::reconstruct(const std::vector<RTSS_Share>& shares) byte hash_id = shares[0].contents[16]; - std::auto_ptr<HashFunction> hash(get_rtss_hash_by_id(hash_id)); + std::unique_ptr<HashFunction> hash(get_rtss_hash_by_id(hash_id)); if(shares[0].size() != secret_len + hash->output_length() + RTSS_HEADER_SIZE + 1) throw Decoding_Error("Bad RTSS length field in header"); |