📄 keyusage.java
字号:
// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi
// Source File Name: KeyUsage.java
package jit.asn1.x509;
import jit.asn1.DERBitString;
public class KeyUsage extends DERBitString
{
public static final int digitalSignature = 128;
public static final int nonRepudiation = 64;
public static final int keyEncipherment = 32;
public static final int dataEncipherment = 16;
public static final int keyAgreement = 8;
public static final int keyCertSign = 4;
public static final int cRLSign = 2;
public static final int encipherOnly = 1;
public static final int decipherOnly = 32768;
public KeyUsage(int usage)
{
super(DERBitString.getBytes(usage), DERBitString.getPadBits(usage));
}
public KeyUsage(DERBitString usage)
{
super(usage.getBytes(), usage.getPadBits());
}
public boolean[] getKeyUsage()
{
byte bKeyUsage[] = getBytes();
int length = bKeyUsage.length * 8 - getPadBits();
boolean keyUsage[] = new boolean[length >= 9 ? length : 9];
for(int i = 0; i != length; i++)
keyUsage[i] = (bKeyUsage[i / 8] & 128 >>> i % 8) != 0;
return keyUsage;
}
static
{
digitalSignature = 128;
nonRepudiation = 64;
keyEncipherment = 32;
dataEncipherment = 16;
keyAgreement = 8;
keyCertSign = 4;
cRLSign = 2;
encipherOnly = 1;
decipherOnly = 32768;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -