Enzoic 2.0.0.4

Enzoic client library for .NET.  Wraps the Enzoic API.  See https://www.enzoic.com/ to learn more.

Install-Package Enzoic -Version 2.0.0.4
dotnet add package Enzoic --version 2.0.0.4
<PackageReference Include="Enzoic" Version="2.0.0.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Enzoic --version 2.0.0.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Enzoic .NET Client Library

TOC

This README covers the following topics:

Installation

The compiled library is available from NuGet:

Nuget

Install-Package Enzoic

API Overview

Here's the API in a nutshell.

// Create a new Enzoic instance - this is our primary interface for making API calls
Enzoic enzoic = new Enzoic("YOUR_API_KEY", "YOUR_API_SECRET");
 
// Check whether a password has been compromised
if (enzoic.CheckPassword("password-to-test")) {
    Console.WriteLine("Password is compromised");
}
else {
    Console.WriteLine("Password is not compromised");
}
 
// Check whether a specific set of credentials are compromised
if (enzoic.CheckCredentials("test@enzoic.com", "password-to-test")) {
    Console.WriteLine("Credentials are compromised");
}
else {
    Console.WriteLine("Credentials are not compromised");
}

// Use the optional parameters on the CheckCredentials call to tweak performance by including the
// date/time of the last check and excluding BCrypt
if (enzoic.CheckCredentials("test@enzoic.com", "password-to-test",
        lastCheckTimestamp, new PasswordType[] { PasswordType.BCrypt })) {
    Console.WriteLine("Credentials are compromised");
}
else {
    Console.WriteLine("Credentials are not compromised");
}

 
// get all exposures for a given user
ExposuresResponse exposures = enzoic.GetExposuresForUser("test@enzoic.com");
Console.WriteLine(exposures.Count + " exposures found for test@enzoic.com");
 
// now get the full details for the first exposure returned in the exposures response
ExposureDetails details = enzoic.GetExposureDetails(exposures.Exposures[0]);
Console.WriteLine("First exposure for test@enzoic.com was " + details.Title);

More information in reference format can be found below.

The Enzoic constructor

The standard constructor takes the API key and secret you were issued on Enzoic signup.

Enzoic enzoic = new Enzoic("YOUR_API_KEY", "YOUR_API_SECRET");

If you were instructed to use an alternate API endpoint, you may call the overloaded constructor and pass the base URL you were provided.

Enzoic enzoic = new Enzoic("YOUR_API_KEY", "YOUR_API_SECRET", "https://api-alt.enzoic.com/v1");

ExposuresResponse

The Enzoic.GetExposuresForUser method returns the response object below.

    /// <summary>
    /// Response object for the Enzoic.GetExposuresForUser method
    /// </summary>
    public class ExposuresResponse
    {
        /// <summary>
        /// The number of items in the exposures array
        /// </summary>
        public int Count { get; set; }

        /// <summary>
        /// An array of Exposure IDs. The IDs can be used with the GetExposureDetails call to retrieve additional info on each exposure.
        /// </summary>
        public String[] Exposures { get; set; }
    }

ExposureDetails

The Enzoic.GetExposureDetails method returns the response object below.

    /// <summary>
    /// The detailed information about a given credentials Exposure.  
    /// </summary>
    public class ExposureDetails
    {
        /// <summary>
        /// The ID of the exposure
        /// </summary>
        public String ID { get; set; }

        /// <summary>
        /// Title of the exposure - for breaches, the domain of the origin site
        /// </summary>
        public String Title { get; set; }

        /// <summary>
        /// The number of credentials found in the exposure
        /// </summary>
        public int Entries { get; set; }

        /// <summary>
        /// The date the exposure occurred, as much as is known. The value is as follows:
        /// *      - null if the date is not known
        /// *      - Month and day set to December 31st, if only the year is known(e.g. "2015-12-31" if Exposure date was sometime in 2015)
        /// *      - Day set to the first of the month if only the month is known(e.g. "2015-06-01" if Exposure date was sometime in June 2015)
        /// *      - Otherwise, exact date if exact date is known, including time
        /// </summary>
        public DateTime Date { get; set; }

        /// <summary>
        /// A category for the origin website, if the exposure was a data breach.
        /// </summary>
        public String Category { get; set; }

        /// <summary>
        /// The format of the passwords in the Exposure, e.g. "Cleartext", "MD5", "BCrypt", etc.
        /// </summary>
        public String PasswordType { get; set; }

        /// <summary>
        /// The types of user data which were present in the Exposure, e.g. "Emails", "Passwords", "Physical Addresses", "Phone Numbers", etc.
        /// </summary>
        public String[] ExposedData { get; set; }

        /// <summary>
        /// The date the Exposure was found and added to the Enzoic database.
        /// </summary>
        public DateTime DateAdded { get; set; }

        /// <summary>
        /// An array of URLs the data was found at. Only present for some types of Exposures, like when the source was a paste site.
        /// </summary>
        public String[] SourceURLs { get; set; }

        /// <summary>
        /// The number of unique email address domains in this Exposure. So, for instance, if the Exposure only contained "gmail.com" and "yahoo.com" email addresses, this number would be 2.
        /// </summary>
        public int DomainsAffected { get; set; }
    }

License

This code is free to use under the terms of the MIT license.

Enzoic .NET Client Library

TOC

This README covers the following topics:

Installation

The compiled library is available from NuGet:

Nuget

Install-Package Enzoic

API Overview

Here's the API in a nutshell.

// Create a new Enzoic instance - this is our primary interface for making API calls
Enzoic enzoic = new Enzoic("YOUR_API_KEY", "YOUR_API_SECRET");
 
// Check whether a password has been compromised
if (enzoic.CheckPassword("password-to-test")) {
    Console.WriteLine("Password is compromised");
}
else {
    Console.WriteLine("Password is not compromised");
}
 
// Check whether a specific set of credentials are compromised
if (enzoic.CheckCredentials("test@enzoic.com", "password-to-test")) {
    Console.WriteLine("Credentials are compromised");
}
else {
    Console.WriteLine("Credentials are not compromised");
}

// Use the optional parameters on the CheckCredentials call to tweak performance by including the
// date/time of the last check and excluding BCrypt
if (enzoic.CheckCredentials("test@enzoic.com", "password-to-test",
        lastCheckTimestamp, new PasswordType[] { PasswordType.BCrypt })) {
    Console.WriteLine("Credentials are compromised");
}
else {
    Console.WriteLine("Credentials are not compromised");
}

 
// get all exposures for a given user
ExposuresResponse exposures = enzoic.GetExposuresForUser("test@enzoic.com");
Console.WriteLine(exposures.Count + " exposures found for test@enzoic.com");
 
// now get the full details for the first exposure returned in the exposures response
ExposureDetails details = enzoic.GetExposureDetails(exposures.Exposures[0]);
Console.WriteLine("First exposure for test@enzoic.com was " + details.Title);

More information in reference format can be found below.

The Enzoic constructor

The standard constructor takes the API key and secret you were issued on Enzoic signup.

Enzoic enzoic = new Enzoic("YOUR_API_KEY", "YOUR_API_SECRET");

If you were instructed to use an alternate API endpoint, you may call the overloaded constructor and pass the base URL you were provided.

Enzoic enzoic = new Enzoic("YOUR_API_KEY", "YOUR_API_SECRET", "https://api-alt.enzoic.com/v1");

ExposuresResponse

The Enzoic.GetExposuresForUser method returns the response object below.

    /// <summary>
    /// Response object for the Enzoic.GetExposuresForUser method
    /// </summary>
    public class ExposuresResponse
    {
        /// <summary>
        /// The number of items in the exposures array
        /// </summary>
        public int Count { get; set; }

        /// <summary>
        /// An array of Exposure IDs. The IDs can be used with the GetExposureDetails call to retrieve additional info on each exposure.
        /// </summary>
        public String[] Exposures { get; set; }
    }

ExposureDetails

The Enzoic.GetExposureDetails method returns the response object below.

    /// <summary>
    /// The detailed information about a given credentials Exposure.  
    /// </summary>
    public class ExposureDetails
    {
        /// <summary>
        /// The ID of the exposure
        /// </summary>
        public String ID { get; set; }

        /// <summary>
        /// Title of the exposure - for breaches, the domain of the origin site
        /// </summary>
        public String Title { get; set; }

        /// <summary>
        /// The number of credentials found in the exposure
        /// </summary>
        public int Entries { get; set; }

        /// <summary>
        /// The date the exposure occurred, as much as is known. The value is as follows:
        /// *      - null if the date is not known
        /// *      - Month and day set to December 31st, if only the year is known(e.g. "2015-12-31" if Exposure date was sometime in 2015)
        /// *      - Day set to the first of the month if only the month is known(e.g. "2015-06-01" if Exposure date was sometime in June 2015)
        /// *      - Otherwise, exact date if exact date is known, including time
        /// </summary>
        public DateTime Date { get; set; }

        /// <summary>
        /// A category for the origin website, if the exposure was a data breach.
        /// </summary>
        public String Category { get; set; }

        /// <summary>
        /// The format of the passwords in the Exposure, e.g. "Cleartext", "MD5", "BCrypt", etc.
        /// </summary>
        public String PasswordType { get; set; }

        /// <summary>
        /// The types of user data which were present in the Exposure, e.g. "Emails", "Passwords", "Physical Addresses", "Phone Numbers", etc.
        /// </summary>
        public String[] ExposedData { get; set; }

        /// <summary>
        /// The date the Exposure was found and added to the Enzoic database.
        /// </summary>
        public DateTime DateAdded { get; set; }

        /// <summary>
        /// An array of URLs the data was found at. Only present for some types of Exposures, like when the source was a paste site.
        /// </summary>
        public String[] SourceURLs { get; set; }

        /// <summary>
        /// The number of unique email address domains in this Exposure. So, for instance, if the Exposure only contained "gmail.com" and "yahoo.com" email addresses, this number would be 2.
        /// </summary>
        public int DomainsAffected { get; set; }
    }

License

This code is free to use under the terms of the MIT license.

Release Notes

Modified to use new, more secure partial hash matching for Passwords and Credentials calls.  Also, added support for additional password hash algorithms.

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
2.0.0.4 61 7/1/2019