blob: 994d0e47d9aaf56a664004bc763067c73da879d9 [file] [log] [blame]
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_CREDENTIAL_PROVIDER_GAIACP_TOKEN_GENERATOR_H_
#define CHROME_CREDENTIAL_PROVIDER_GAIACP_TOKEN_GENERATOR_H_
#include <string>
namespace credential_provider {
class TokenGenerator {
public:
// Returns the storage used for the instance pointer.
static TokenGenerator** GetInstanceStorage();
static TokenGenerator* Get();
// Generates a 128-bit token from a cryptographically strong random source.
virtual std::string GenerateToken();
protected:
TokenGenerator();
virtual ~TokenGenerator();
};
} // namespace credential_provider
#endif // CHROME_CREDENTIAL_PROVIDER_GAIACP_TOKEN_GENERATOR_H_