Click here to Skip to main content
13,140,591 members (49,253 online)
Click here to Skip to main content

Tagged as

Stats

94.3K views
11.6K downloads
250 bookmarked
Posted 5 Aug 2010

Implementation of the Licensing System for a Software Product

This article is devoted to the development of the key licensing system for the applications.
bin
ClientTest.exe
DigitalSignature.exe
src
src
ClientTest
keys
public.bin
cryptopp560
adhoc.cpp.copied
adhoc.cpp.proto
cryptdll.dsp
cryptest.dsp
cryptest.dsw
cryptest_bds.bdsgroup
cryptest_bds.bdsproj
cryptest_bds.bpf
cryptlib.dsp
cryptlib_bds.bdsproj
dlltest.dsp
Doxyfile
GNUmakefile
DigitalSignature
keys
private.bin
public.bin
Utils
#ifndef CRYPTOPP_SERPENT_H
#define CRYPTOPP_SERPENT_H

/** \file
*/

#include "seckey.h"
#include "secblock.h"

NAMESPACE_BEGIN(CryptoPP)

//! _
struct Serpent_Info : public FixedBlockSize<16>, public VariableKeyLength<16, 0, 32>, public FixedRounds<32>
{
	static const char *StaticAlgorithmName() {return "Serpent";}
};

/// <a href="http://www.weidai.com/scan-mirror/cs.html#Serpent">Serpent</a>
class Serpent : public Serpent_Info, public BlockCipherDocumentation
{
	class CRYPTOPP_NO_VTABLE Base : public BlockCipherImpl<Serpent_Info>
	{
	public:
		void UncheckedSetKey(const byte *userKey, unsigned int length, const NameValuePairs &params);

	protected:
		FixedSizeSecBlock<word32, 33*4> m_key;
	};

	class CRYPTOPP_NO_VTABLE Enc : public Base
	{
	public:
		void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
	};

	class CRYPTOPP_NO_VTABLE Dec : public Base
	{
	public:
		void ProcessAndXorBlock(const byte *inBlock, const byte *xorBlock, byte *outBlock) const;
	};

public:
	typedef BlockCipherFinal<ENCRYPTION, Enc> Encryption;
	typedef BlockCipherFinal<DECRYPTION, Dec> Decryption;
};

typedef Serpent::Encryption SerpentEncryption;
typedef Serpent::Decryption SerpentDecryption;

NAMESPACE_END

#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Authors

Apriorit Inc
Apriorit Inc.
Hungary Hungary
This member doesn't quite have enough reputation to be able to display their biography and homepage.
Group type: Organisation

32 members


Sergii Bratus
Software Developer Apriorit Inc.
Ukraine Ukraine
No Biography provided

You may also be interested in...

Pro
Pro
Permalink | Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.170915.1 | Last Updated 5 Aug 2010
Article Copyright 2010 by Apriorit Inc, Sergii Bratus
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid