예제 #1
0
 public static KeyPair func_75891_b() {
   try {
     KeyPairGenerator keypairgenerator = KeyPairGenerator.getInstance("RSA");
     keypairgenerator.initialize(1024);
     return keypairgenerator.generateKeyPair();
   } catch (NoSuchAlgorithmException nosuchalgorithmexception) {
     nosuchalgorithmexception.printStackTrace();
   }
   System.err.println("Key pair generation failed!");
   return null;
 }
예제 #2
0
 public static PublicKey func_75896_a(byte p_75896_0_[]) {
   try {
     X509EncodedKeySpec x509encodedkeyspec = new X509EncodedKeySpec(p_75896_0_);
     KeyFactory keyfactory = KeyFactory.getInstance("RSA");
     return keyfactory.generatePublic(x509encodedkeyspec);
   } catch (NoSuchAlgorithmException nosuchalgorithmexception) {
     nosuchalgorithmexception.printStackTrace();
   } catch (InvalidKeySpecException invalidkeyspecexception) {
     invalidkeyspecexception.printStackTrace();
   }
   System.err.println("Public key reconstitute failed!");
   return null;
 }
예제 #3
0
 private static Cipher func_75886_a(int p_75886_0_, String p_75886_1_, Key p_75886_2_) {
   try {
     Cipher cipher = Cipher.getInstance(p_75886_1_);
     cipher.init(p_75886_0_, p_75886_2_);
     return cipher;
   } catch (InvalidKeyException invalidkeyexception) {
     invalidkeyexception.printStackTrace();
   } catch (NoSuchAlgorithmException nosuchalgorithmexception) {
     nosuchalgorithmexception.printStackTrace();
   } catch (NoSuchPaddingException nosuchpaddingexception) {
     nosuchpaddingexception.printStackTrace();
   }
   System.err.println("Cipher creation failed!");
   return null;
 }
예제 #4
0
  private static byte[] func_75893_a(String p_75893_0_, byte p_75893_1_[][]) {
    try {
      MessageDigest messagedigest = MessageDigest.getInstance(p_75893_0_);
      byte abyte0[][] = p_75893_1_;
      int i = abyte0.length;
      for (int j = 0; j < i; j++) {
        byte abyte1[] = abyte0[j];
        messagedigest.update(abyte1);
      }

      return messagedigest.digest();
    } catch (NoSuchAlgorithmException nosuchalgorithmexception) {
      nosuchalgorithmexception.printStackTrace();
    }
    return null;
  }