title: From DEROctetString to KeyUsage
body: <p>In <a href="http://www.bouncycastle.org" rel="nofollow noreferrer">bouncycastle</a> I can create a DEROctetString starting from a KeyUsage.</p>
  
  <p>How can I obtain KeyUsage starting from a DEROctetString then?</p>
  
  <p>Example:</p>
  
  <pre><code>DEROctetString derString = new DEROctetString(new KeyUsage(KeyUsage.digitalSignature));
  KeyUsage ku = ...(some code to get back KeyUsage starting from derString)...
  </code></pre>
  
  <p>I need this because I'm able to create Certificate Requests with KeyUsage extension request, but then, given the Certificate Request alone, I'm not able to get back the KeyUsage extension.</p>