code: public static org.bouncycastle.asn1.x509.KeyUsage getKeyUsage(EnumSet<KeyUsage> usages)
      {
          int bitmask = 0;
          for (KeyUsage usage : usages) {
              bitmask |= usage.value();
          }
          return new org.bouncycastle.asn1.x509.KeyUsage(bitmask);
      }
docs: Convert a set of key usages to Bouncy Castle key usage.
  
  @param usages the set of authorized usages.
  @return a bit mask