/** * Clones this {@code Mac} instance and the underlying implementation. * * @return the cloned instance. * @throws CloneNotSupportedException * if the underlying implementation does not support cloning. */ @Override public final Object clone() throws CloneNotSupportedException { MacSpi newSpiImpl = (MacSpi)spiImpl.clone(); Mac mac = new Mac(newSpiImpl, this.provider, this.algorithm); mac.isInitMac = this.isInitMac; return mac; } }
/** * Creates a new {@code Mac} instance that provides the specified MAC * algorithm. * * @param algorithm * the name of the requested MAC algorithm. * @return the new {@code Mac} instance. * @throws NoSuchAlgorithmException * if the specified algorithm is not available by any provider. * @throws NullPointerException * if {@code algorithm} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release). */ public static final Mac getInstance(String algorithm) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NullPointerException("algorithm == null"); } Engine.SpiAndProvider sap = ENGINE.getInstance(algorithm, null); return new Mac((MacSpi) sap.spi, sap.provider, algorithm); }
/** * Creates a new {@code Mac} instance that provides the specified MAC * algorithm from the specified provider. * * @param algorithm * the name of the requested MAC algorithm. * @param provider * the provider that is providing the algorithm. * @return the new {@code Mac} instance. * @throws NoSuchAlgorithmException * if the specified algorithm is not provided by the specified * provider. * @throws IllegalArgumentException * if {@code provider} is {@code null}. * @throws NullPointerException * if {@code algorithm} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release). */ public static final Mac getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException { if (provider == null) { throw new IllegalArgumentException("provider == null"); } if (algorithm == null) { throw new NullPointerException("algorithm == null"); } Object spi = ENGINE.getInstance(algorithm, provider, null); return new Mac((MacSpi) spi, provider, algorithm); }
/** * Clones this {@code Mac} instance and the underlying implementation. * * @return the cloned instance. * @throws CloneNotSupportedException * if the underlying implementation does not support cloning. */ @Override public final Object clone() throws CloneNotSupportedException { MacSpi newSpiImpl = (MacSpi)spiImpl.clone(); Mac mac = new Mac(newSpiImpl, this.provider, this.algorithm); mac.isInitMac = this.isInitMac; return mac; } }
/** * Clones this {@code Mac} instance and the underlying implementation. * * @return the cloned instance. * @throws CloneNotSupportedException * if the underlying implementation does not support cloning. */ @Override public final Object clone() throws CloneNotSupportedException { MacSpi newSpiImpl = (MacSpi)spiImpl.clone(); Mac mac = new Mac(newSpiImpl, this.provider, this.algorithm); mac.isInitMac = this.isInitMac; return mac; } }
/** * Clones this {@code Mac} instance and the underlying implementation. * * @return the cloned instance. * @throws CloneNotSupportedException * if the underlying implementation does not support cloning. */ @Override public final Object clone() throws CloneNotSupportedException { MacSpi newSpiImpl = (MacSpi)spiImpl.clone(); Mac mac = new Mac(newSpiImpl, this.provider, this.algorithm); mac.isInitMac = this.isInitMac; return mac; } }
/** * Clones this {@code Mac} instance and the underlying implementation. * * @return the cloned instance. * @throws CloneNotSupportedException * if the underlying implementation does not support cloning. */ @Override public final Object clone() throws CloneNotSupportedException { MacSpi newSpiImpl = (MacSpi)spiImpl.clone(); Mac mac = new Mac(newSpiImpl, this.provider, this.algorithm); mac.isInitMac = this.isInitMac; return mac; } }
/** * Clones this {@code Mac} instance and the underlying implementation. * * @return the cloned instance. * @throws CloneNotSupportedException * if the underlying implementation does not support cloning. */ @Override public final Object clone() throws CloneNotSupportedException { MacSpi newSpiImpl = (MacSpi)spiImpl.clone(); Mac mac = new Mac(newSpiImpl, this.provider, this.algorithm); mac.isInitMac = this.isInitMac; return mac; } }
/** * Clones this {@code Mac} instance and the underlying implementation. * * @return the cloned instance. * @throws CloneNotSupportedException * if the underlying implementation does not support cloning. */ @Override public final Object clone() throws CloneNotSupportedException { MacSpi newSpiImpl = (MacSpi)spiImpl.clone(); Mac mac = new Mac(newSpiImpl, this.provider, this.algorithm); mac.isInitMac = this.isInitMac; return mac; } }
/** * Creates a new {@code Mac} instance that provides the specified MAC * algorithm. * * @param algorithm * the name of the requested MAC algorithm. * @return the new {@code Mac} instance. * @throws NoSuchAlgorithmException * if the specified algorithm is not available by any provider. * @throws NullPointerException * if {@code algorithm} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release). */ public static final Mac getInstance(String algorithm) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NullPointerException("algorithm == null"); } Engine.SpiAndProvider sap = ENGINE.getInstance(algorithm, null); return new Mac((MacSpi) sap.spi, sap.provider, algorithm); }
/** * Creates a new {@code Mac} instance that provides the specified MAC * algorithm. * * @param algorithm * the name of the requested MAC algorithm. * @return the new {@code Mac} instance. * @throws NoSuchAlgorithmException * if the specified algorithm is not available by any provider. * @throws NullPointerException * if {@code algorithm} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release). */ public static final Mac getInstance(String algorithm) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NullPointerException("algorithm == null"); } Engine.SpiAndProvider sap = ENGINE.getInstance(algorithm, null); return new Mac((MacSpi) sap.spi, sap.provider, algorithm); }
/** * Creates a new {@code Mac} instance that provides the specified MAC * algorithm. * * @param algorithm * the name of the requested MAC algorithm. * @return the new {@code Mac} instance. * @throws NoSuchAlgorithmException * if the specified algorithm is not available by any provider. * @throws NullPointerException * if {@code algorithm} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release). */ public static final Mac getInstance(String algorithm) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NullPointerException("algorithm == null"); } Engine.SpiAndProvider sap = ENGINE.getInstance(algorithm, null); return new Mac((MacSpi) sap.spi, sap.provider, algorithm); }
/** * Creates a new {@code Mac} instance that provides the specified MAC * algorithm. * * @param algorithm * the name of the requested MAC algorithm. * @return the new {@code Mac} instance. * @throws NoSuchAlgorithmException * if the specified algorithm is not available by any provider. * @throws NullPointerException * if {@code algorithm} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release). */ public static final Mac getInstance(String algorithm) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NullPointerException("algorithm == null"); } Engine.SpiAndProvider sap = ENGINE.getInstance(algorithm, null); return new Mac((MacSpi) sap.spi, sap.provider, algorithm); }
/** * Creates a new {@code Mac} instance that provides the specified MAC * algorithm. * * @param algorithm * the name of the requested MAC algorithm. * @return the new {@code Mac} instance. * @throws NoSuchAlgorithmException * if the specified algorithm is not available by any provider. * @throws NullPointerException * if {@code algorithm} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release). */ public static final Mac getInstance(String algorithm) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NullPointerException("algorithm == null"); } Engine.SpiAndProvider sap = ENGINE.getInstance(algorithm, null); return new Mac((MacSpi) sap.spi, sap.provider, algorithm); }
/** * Creates a new {@code Mac} instance that provides the specified MAC * algorithm. * * @param algorithm * the name of the requested MAC algorithm. * @return the new {@code Mac} instance. * @throws NoSuchAlgorithmException * if the specified algorithm is not available by any provider. * @throws NullPointerException * if {@code algorithm} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release). */ public static final Mac getInstance(String algorithm) throws NoSuchAlgorithmException { if (algorithm == null) { throw new NullPointerException("algorithm == null"); } Engine.SpiAndProvider sap = ENGINE.getInstance(algorithm, null); return new Mac((MacSpi) sap.spi, sap.provider, algorithm); }
/** * Creates a new {@code Mac} instance that provides the specified MAC * algorithm from the specified provider. * * @param algorithm * the name of the requested MAC algorithm. * @param provider * the provider that is providing the algorithm. * @return the new {@code Mac} instance. * @throws NoSuchAlgorithmException * if the specified algorithm is not provided by the specified * provider. * @throws IllegalArgumentException * if {@code provider} is {@code null}. * @throws NullPointerException * if {@code algorithm} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release). */ public static final Mac getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException { if (provider == null) { throw new IllegalArgumentException("provider == null"); } if (algorithm == null) { throw new NullPointerException("algorithm == null"); } Object spi = ENGINE.getInstance(algorithm, provider, null); return new Mac((MacSpi) spi, provider, algorithm); }
/** * Creates a new {@code Mac} instance that provides the specified MAC * algorithm from the specified provider. * * @param algorithm * the name of the requested MAC algorithm. * @param provider * the provider that is providing the algorithm. * @return the new {@code Mac} instance. * @throws NoSuchAlgorithmException * if the specified algorithm is not provided by the specified * provider. * @throws IllegalArgumentException * if {@code provider} is {@code null}. * @throws NullPointerException * if {@code algorithm} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release). */ public static final Mac getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException { if (provider == null) { throw new IllegalArgumentException("provider == null"); } if (algorithm == null) { throw new NullPointerException("algorithm == null"); } Object spi = ENGINE.getInstance(algorithm, provider, null); return new Mac((MacSpi) spi, provider, algorithm); }
/** * Creates a new {@code Mac} instance that provides the specified MAC * algorithm from the specified provider. * * @param algorithm * the name of the requested MAC algorithm. * @param provider * the provider that is providing the algorithm. * @return the new {@code Mac} instance. * @throws NoSuchAlgorithmException * if the specified algorithm is not provided by the specified * provider. * @throws IllegalArgumentException * if {@code provider} is {@code null}. * @throws NullPointerException * if {@code algorithm} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release). */ public static final Mac getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException { if (provider == null) { throw new IllegalArgumentException("provider == null"); } if (algorithm == null) { throw new NullPointerException("algorithm == null"); } Object spi = ENGINE.getInstance(algorithm, provider, null); return new Mac((MacSpi) spi, provider, algorithm); }
/** * Creates a new {@code Mac} instance that provides the specified MAC * algorithm from the specified provider. * * @param algorithm * the name of the requested MAC algorithm. * @param provider * the provider that is providing the algorithm. * @return the new {@code Mac} instance. * @throws NoSuchAlgorithmException * if the specified algorithm is not provided by the specified * provider. * @throws IllegalArgumentException * if {@code provider} is {@code null}. * @throws NullPointerException * if {@code algorithm} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release). */ public static final Mac getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException { if (provider == null) { throw new IllegalArgumentException("provider == null"); } if (algorithm == null) { throw new NullPointerException("algorithm == null"); } Object spi = ENGINE.getInstance(algorithm, provider, null); return new Mac((MacSpi) spi, provider, algorithm); }
/** * Creates a new {@code Mac} instance that provides the specified MAC * algorithm from the specified provider. * * @param algorithm * the name of the requested MAC algorithm. * @param provider * the provider that is providing the algorithm. * @return the new {@code Mac} instance. * @throws NoSuchAlgorithmException * if the specified algorithm is not provided by the specified * provider. * @throws IllegalArgumentException * if {@code provider} is {@code null}. * @throws NullPointerException * if {@code algorithm} is {@code null} (instead of * NoSuchAlgorithmException as in 1.4 release). */ public static final Mac getInstance(String algorithm, Provider provider) throws NoSuchAlgorithmException { if (provider == null) { throw new IllegalArgumentException("provider == null"); } if (algorithm == null) { throw new NullPointerException("algorithm == null"); } Object spi = ENGINE.getInstance(algorithm, provider, null); return new Mac((MacSpi) spi, provider, algorithm); }