Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > general question to aspect-oriented-programming

Thread Tools

general question to aspect-oriented-programming

Julia Donawald
Posts: n/a

I am trying to write a simple aspect with AspectJ for secret-key and
public-key encryption of data. I am not that familar with the approach of
aspect-oriented-programming, so I am thinking of how to realize it.

I started to write a basic aspect for secret-key encryption which uses a
function-pointcut from which it get the data to encrypt/derypt and the key.
I defined then an advice which is always called when the pointcut is
matched. This advice (in my test-example I used an before-advice) takes as
input-parameter the data to encrypt/decrypt and the secret-key. It then
performs the encryption/decryption functionality and saves the result in a

I wonder now if this is a senseful way writing an apspect for
encryption/decryption, cause as I know the aspect should be totally
independent from its business-logic. In my case the advice is strongly
connected to the keys and the proecessing depends from the key it gets as
parameter from the "pointcutted"-function in the business-code. I am
thinking now if it would be better to hardcode the key in the advice,
although from a security point-of-view that doesn't make much sense, cause
everyone who uses the apsect can break the encryption. Is there any senseful
possibility for writing an aspect for secret-key encryption? How would you
solve such a problem, cause I am still in a starting-phase of undestanding
the aspect-oriented-programing approach.

In fact I found the following paper
and I wonder now why on page 3 in the around-advice of the AbstractDESAspect
the pointcut encryptOperations has a parameter for the message which should
be encrypted but no key which should be used for encryption. Rathern then
giving the key as parameter, the key is hardcoded in the body of the advice.
Is there any reason for doing this?

Thanks a lot in advance,

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
general question question is fun to answeder Robin Javascript 2 02-23-2011 09:31 PM
General....very general.... no important for u forever hi Python 0 03-18-2009 08:21 AM
Re: PROBLEM SOLVED General USB Printer setup question, and situation-specific question Bum A+ Certification 0 01-15-2005 10:13 AM
Re: General USB Printer setup question, and situation-specific question AG A+ Certification 0 01-13-2005 11:13 PM
General .Net Question Jolly Student ASP .Net 0 06-11-2004 02:16 AM