• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Tim Cooke
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
Saloon Keepers:
  • Piet Souris
Bartenders:

Decoding ASN Byte Array into seconds

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I am using JNDI for LDAP operations. For 'Password Expiry Warning control' feature, I am using the following code.

Control[] controls = ctx.getResponseControls();

if (controls != null)
{
if (controls[0].getID().equals("2.16.840.1.113730.3.4.5")) {
byte[] controlsRawValue = controls[0].getEncodedValue();
}
}

where controlsRawValue is an ASN encoded Byte array (Thats what Java documentation says). I need to decode it into number of seconds. Anybody has sample code for that ?

Thanks for your help.

- VM Rao
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic