I have a generateKey function which was made static and private but I kept on getting error as title. Below is the Inner exception explanation as per exception.
using java.nio;
using java.security;
using javax.crypto;
using javax.crypto.spec;
public SecretKey generateKey(int n) //here n = 256
{
KeyGenerator keyGenerator;
SecretKey key = null;
try
{
keyGenerator = KeyGenerator.getInstance(KEY_ALGORITHOM); //here KEY_ALGORITHOM = "AES"
keyGenerator.init(n);
key = keyGenerator.generateKey();
}
catch (Exception e)
{
//log exception
}
return key;
}
Inner exception: Method not found: 'Void System.IO.FileStream..ctor(System.String, System.IO.FileMode, System.Security.AccessControl.FileSystemRights, System.IO.FileShare, Int32, System.IO.FileOptions)'.
Not getting as to what else is required