// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Security.Cryptography;
using Microsoft.Framework.Internal;
namespace Microsoft.AspNet.DataProtection
{
///
/// An interface that can provide data protection services.
///
public interface IDataProtector : IDataProtectionProvider
{
///
/// Cryptographically protects a piece of plaintext data.
///
/// The plaintext data to protect.
/// The protected form of the plaintext data.
byte[] Protect([NotNull] byte[] plaintext);
///
/// Cryptographically unprotects a piece of protected data.
///
/// The protected data to unprotect.
/// The plaintext form of the protected data.
///
/// Thrown if the protected data is invalid or malformed.
///
byte[] Unprotect([NotNull] byte[] protectedData);
}
}