Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #38366
| From | Eric Sosman <esosman@comcast-dot-net.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Cipher.getInstance causing exception saying "length=4 index=7" |
| Date | 2018-06-12 11:57 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <pfoqh5$ka$1@dont-email.me> (permalink) |
| References | <20305580-c3c7-4309-83ba-e3cbe594ec21@googlegroups.com> <pfog0l$q4i$1@dont-email.me> <0bec52a1-055e-46bf-9f49-734331b1663c@googlegroups.com> |
On 6/12/2018 10:36 AM, Eric Douglas wrote:
> On Tuesday, June 12, 2018 at 8:58:08 AM UTC-4, Eric Sosman wrote:
>>> I have a small test program to try and encrypt the message hello world. It keeps causing a exception when it calls getinstance. code
>>
>> It would help if (1) you revealed the nature of the exception and
>> (2) if you showed us your code. Yes, I know you showed us something
>> that you called "code," but clearly it's not "the code" that causes
>> an exception. (This is clear because the code shown won't even
>> compile, hence it won't run, hence it will throw no exceptions,
>> hence it isn't "the code.")
>>
>> Post again when you're able to come up with a more complete and
>> more accurate problem description.
>>
>
> Sure it compiles, once you add the imports, fix the method definition, and add a main to make it runnable. [...]
... and declare the undeclared identifier, and put the whole
thing in a class.
My point being: Yes, it's possible to fix the broken code, run
the fixed version and observe the breakage, diagnose what happened,
and suggest a fix. With luck and a following wind the suggested
fix to the altered code may even be helpful in repairing the unseen
original. But there's also an excellent chance that the assorted
modifications have led to something that doesn't resemble the real
code, and that the "fix" won't help at all.
> [...] I ran it, didn't get any exceptions because it's catching and ignoring them. I added a print, so here's the trace.
> [...]
> java.security.InvalidKeyException: Wrong key size
Yes, yes, we can all get that far. But did we manage to
reconstruct the shrouded-in-mystery original? Or are we debugging
something "plausible" but unlike reality? Is the O.P. encountering
this same problem, or something rather different?
--
esosman@comcast-dot-net.invalid
Nine hundred fifty-three days to go.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Cipher.getInstance causing exception saying "length=4 index=7" tedpottel5@gmail.com - 2018-06-12 04:38 -0700
Re: Cipher.getInstance causing exception saying "length=4 index=7" Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-06-12 08:57 -0400
Re: Cipher.getInstance causing exception saying "length=4 index=7" Eric Douglas <e.d.programmer@gmail.com> - 2018-06-12 07:36 -0700
Re: Cipher.getInstance causing exception saying "length=4 index=7" Eric Sosman <esosman@comcast-dot-net.invalid> - 2018-06-12 11:57 -0400
Re: Cipher.getInstance causing exception saying "length=4 index=7" v_borchert@despammed.com (Volker Borchert) - 2018-06-12 19:32 +0000
Re: Cipher.getInstance causing exception saying "length=4 index=7" Eric Douglas <e.d.programmer@gmail.com> - 2018-06-12 07:41 -0700
Re: Cipher.getInstance causing exception saying "length=4 index=7" Eric Douglas <e.d.programmer@gmail.com> - 2018-06-12 08:33 -0700
csiph-web