• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
I RELEASE YOU! (for now .... ) Feel free to peruse this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic