• Post Reply Bookmark Topic Watch Topic
  • New Topic

Decoding ASN Byte Array into seconds

 
mahesh rao
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!