i am doing a project in which i simulate symmetric encryption in routers.so hav to store secret keys for mac encryption in a symmetric matrix.how do i do it?????????should i convert them to strings and then store strings in a matrix???????

URGENT HELP NEEDED!!!!!!!!!

There is too much jargon in your question and not enough java.
A lot depends on how you want to access the stored data and what you want to do with it while it is stored.

okay,there is a SecretKey class in javax.crypto,i want to store a 2-D array of such keys,
like i want to declare "SecretKey key[8][8]" so that key[j]=key[j] therefore the key between router-i and router-j is the same and i can perform symmetric encryption.

Can you explain what your problem is?
Is it a logic problem with controlling the indexes for the contents of a two dimensional array?
How do you determine the indexes you want to store the data at?

lets say i hav a list of routers from 0 to 7(8 routers),in a 2-D array of size 8X8 i store SecretKey's.I use symmetric encripton so if i am sending a packet from router-i to router-j at router-i i use secretkey[j] to perform encryption at router-j i perform decryption by using secretkey[j].

i want to know how to store keys in an array

Anyway may hav solved it,than for ur interest though :)

i meant thanks for your interest

Please mark this thread as solved.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.