public FormsAuthenticationTicketEncryptor( byte[] decryptionKey, byte[] validationKey, DecryptionKeyAlgorithm decryptionKeyAlgorithm, ValidationKeyAlgorithm validationKeyAlgorithm, CompatibilityMode compatibilityMode) { Initialize(decryptionKey, validationKey, decryptionKeyAlgorithm, validationKeyAlgorithm, compatibilityMode); }
private void Initialize( byte[] decryptionKey, byte[] validationKey, DecryptionKeyAlgorithm decryptionKeyAlgorithm, ValidationKeyAlgorithm validationKeyAlgorithm, CompatibilityMode compatibilityMode) { _CompatibilityMode = compatibilityMode; _DecryptionKeyBlob = KeyDerivator.DeriveKey(decryptionKey, _CompatibilityMode); _hasher = HashProvider.Create(KeyDerivator.DeriveKey(validationKey, _CompatibilityMode), validationKeyAlgorithm); }
public FormsAuthenticationTicketEncryptor( string decryptionKey, string validationKey, DecryptionKeyAlgorithm decryptionKeyAlgorithm, ValidationKeyAlgorithm validationKeyAlgorithm, CompatibilityMode compatibilityMode) { byte[] descriptionKeyBytes = HexUtils.HexToBinary(decryptionKey); byte[] validationKeyBytes = HexUtils.HexToBinary(validationKey); Initialize(descriptionKeyBytes, validationKeyBytes, decryptionKeyAlgorithm, validationKeyAlgorithm, compatibilityMode); }