h128 SecretStore::importSecret(bytesSec const& _s, string const& _pass) { h128 r = h128::random(); EncryptedKey key{encrypt(_s.ref(), _pass), toUUID(r), KeyPair(Secret(_s)).address()}; m_cached[r] = _s; m_keys[r] = move(key); save(); return r; }
h128 SecretStore::importSecret(bytesSec const& _s, string const& _pass) { h128 r; EncryptedKey key{encrypt(_s.ref(), _pass), string()}; r = h128::random(); m_cached[r] = _s; m_keys[r] = move(key); save(); return r; }