I understand GNU-GPL License and replace all GPLed aes/sha256 code to Gladman's AES(http://www.gladman.me.uk/cryptography_t ... leencrypt/) with this code.
Code: Select all
#define sha256_context sha256_ctx
#define sha256_starts sha256_begin
#define sha256_update(a,b,c) sha256_hash(b,c,a)
#define sha256_finish(ctx,digest) sha256_end(digest, ctx)
typedef aes_encrypt_ctx aes_context;
inline void _aes_set_key_e( aes_context *ctx, unsigned char *key, int nbits )
{
int keyLen = nbits/8;
aes_init();
aes_encrypt_key(key, keyLen, ctx);
}
inline void _aes_set_key_d( aes_context *ctx, unsigned char *key, int nbits )
{
int keyLen = nbits/8;
aes_init();
aes_decrypt_key(key, keyLen, (aes_decrypt_ctx*)ctx);
}
inline void _aes_encrypt( aes_context *ctx, const unsigned char input[16], unsigned char output[16] )
{
aes_encrypt((const unsigned char*)input, (unsigned char*)output, ctx);
}
inline void _aes_decrypt( aes_context *ctx, const unsigned char input[16], unsigned char output[16] )
{
aes_decrypt((const unsigned char*)input, (unsigned char*)output, (aes_decrypt_ctx*)ctx);
}
- When I see the license of aescrypt.c, It looks like not a GPLed code. Then, can I use your code(aescrypt.h/cpp) in my commercial-software?
- If I can't use your code, I want to implement a new code that compatible with your Aescrypt format. Is it allowed?
I so appreciate your software and very sorry to try earning money with it.