equal
deleted
inserted
replaced
529 * @see java.security.Provider |
529 * @see java.security.Provider |
530 */ |
530 */ |
531 public static final Cipher getInstance(String transformation) |
531 public static final Cipher getInstance(String transformation) |
532 throws NoSuchAlgorithmException, NoSuchPaddingException |
532 throws NoSuchAlgorithmException, NoSuchPaddingException |
533 { |
533 { |
534 if ((transformation == null) || transformation.equals("")) { |
534 if ((transformation == null) || transformation.isEmpty()) { |
535 throw new NoSuchAlgorithmException("Null or empty transformation"); |
535 throw new NoSuchAlgorithmException("Null or empty transformation"); |
536 } |
536 } |
537 List<Transform> transforms = getTransforms(transformation); |
537 List<Transform> transforms = getTransforms(transformation); |
538 List<ServiceId> cipherServices = new ArrayList<>(transforms.size()); |
538 List<ServiceId> cipherServices = new ArrayList<>(transforms.size()); |
539 for (Transform transform : transforms) { |
539 for (Transform transform : transforms) { |
629 public static final Cipher getInstance(String transformation, |
629 public static final Cipher getInstance(String transformation, |
630 String provider) |
630 String provider) |
631 throws NoSuchAlgorithmException, NoSuchProviderException, |
631 throws NoSuchAlgorithmException, NoSuchProviderException, |
632 NoSuchPaddingException |
632 NoSuchPaddingException |
633 { |
633 { |
634 if ((transformation == null) || transformation.equals("")) { |
634 if ((transformation == null) || transformation.isEmpty()) { |
635 throw new NoSuchAlgorithmException("Null or empty transformation"); |
635 throw new NoSuchAlgorithmException("Null or empty transformation"); |
636 } |
636 } |
637 if ((provider == null) || (provider.length() == 0)) { |
637 if ((provider == null) || (provider.length() == 0)) { |
638 throw new IllegalArgumentException("Missing provider"); |
638 throw new IllegalArgumentException("Missing provider"); |
639 } |
639 } |
696 */ |
696 */ |
697 public static final Cipher getInstance(String transformation, |
697 public static final Cipher getInstance(String transformation, |
698 Provider provider) |
698 Provider provider) |
699 throws NoSuchAlgorithmException, NoSuchPaddingException |
699 throws NoSuchAlgorithmException, NoSuchPaddingException |
700 { |
700 { |
701 if ((transformation == null) || transformation.equals("")) { |
701 if ((transformation == null) || transformation.isEmpty()) { |
702 throw new NoSuchAlgorithmException("Null or empty transformation"); |
702 throw new NoSuchAlgorithmException("Null or empty transformation"); |
703 } |
703 } |
704 if (provider == null) { |
704 if (provider == null) { |
705 throw new IllegalArgumentException("Missing provider"); |
705 throw new IllegalArgumentException("Missing provider"); |
706 } |
706 } |