javax.crypto.Mac.clone()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(264)

本文整理了Java中javax.crypto.Mac.clone()方法的一些代码示例,展示了Mac.clone()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Mac.clone()方法的具体详情如下:
包路径:javax.crypto.Mac
类名称:Mac
方法名:clone

Mac.clone介绍

[英]Clones this Mac instance and the underlying implementation.
[中]克隆此Mac实例和底层实现。

代码示例

代码示例来源:origin: google/guava

  1. private static boolean supportsClone(Mac mac) {
  2. try {
  3. mac.clone();
  4. return true;
  5. } catch (CloneNotSupportedException e) {
  6. return false;
  7. }
  8. }

代码示例来源:origin: prestodb/presto

  1. private static boolean supportsClone(Mac mac) {
  2. try {
  3. mac.clone();
  4. return true;
  5. } catch (CloneNotSupportedException e) {
  6. return false;
  7. }
  8. }

代码示例来源:origin: google/j2objc

  1. private static boolean supportsClone(Mac mac) {
  2. try {
  3. mac.clone();
  4. return true;
  5. } catch (CloneNotSupportedException e) {
  6. return false;
  7. }
  8. }

代码示例来源:origin: wildfly/wildfly

  1. private static boolean supportsClone(Mac mac) {
  2. try {
  3. mac.clone();
  4. return true;
  5. } catch (CloneNotSupportedException e) {
  6. return false;
  7. }
  8. }

代码示例来源:origin: googlemaps/google-maps-services-java

  1. private Mac getMac() {
  2. // Mac is not thread-safe. Requires a new clone for each signature.
  3. try {
  4. return (Mac) mac.clone();
  5. } catch (CloneNotSupportedException e) {
  6. throw new IllegalStateException(e);
  7. }
  8. }
  9. }

代码示例来源:origin: google/guava

  1. @Override
  2. public Hasher newHasher() {
  3. if (supportsClone) {
  4. try {
  5. return new MacHasher((Mac) prototype.clone());
  6. } catch (CloneNotSupportedException e) {
  7. // falls through
  8. }
  9. }
  10. return new MacHasher(getMac(prototype.getAlgorithm(), key));
  11. }

代码示例来源:origin: prestodb/presto

  1. @Override
  2. public Hasher newHasher() {
  3. if (supportsClone) {
  4. try {
  5. return new MacHasher((Mac) prototype.clone());
  6. } catch (CloneNotSupportedException e) {
  7. // falls through
  8. }
  9. }
  10. return new MacHasher(getMac(prototype.getAlgorithm(), key));
  11. }

代码示例来源:origin: google/j2objc

  1. @Override
  2. public Hasher newHasher() {
  3. if (supportsClone) {
  4. try {
  5. return new MacHasher((Mac) prototype.clone());
  6. } catch (CloneNotSupportedException e) {
  7. // falls through
  8. }
  9. }
  10. return new MacHasher(getMac(prototype.getAlgorithm(), key));
  11. }

代码示例来源:origin: wildfly/wildfly

  1. @Override
  2. public Hasher newHasher() {
  3. if (supportsClone) {
  4. try {
  5. return new MacHasher((Mac) prototype.clone());
  6. } catch (CloneNotSupportedException e) {
  7. // falls through
  8. }
  9. }
  10. return new MacHasher(getMac(prototype.getAlgorithm(), key));
  11. }

代码示例来源:origin: org.apache.drill/drill-shaded-guava

  1. private static boolean supportsClone(Mac mac) {
  2. try {
  3. mac.clone();
  4. return true;
  5. } catch (CloneNotSupportedException e) {
  6. return false;
  7. }
  8. }

代码示例来源:origin: org.kill-bill.billing/killbill-platform-osgi-bundles-logger

  1. private static boolean supportsClone(Mac mac) {
  2. try {
  3. mac.clone();
  4. return true;
  5. } catch (CloneNotSupportedException e) {
  6. return false;
  7. }
  8. }

代码示例来源:origin: org.weakref/jmxutils

  1. private static boolean supportsClone(Mac mac) {
  2. try {
  3. mac.clone();
  4. return true;
  5. } catch (CloneNotSupportedException e) {
  6. return false;
  7. }
  8. }

代码示例来源:origin: org.testifyproject.external/external-guava

  1. private static boolean supportsClone(Mac mac) {
  2. try {
  3. mac.clone();
  4. return true;
  5. } catch (CloneNotSupportedException e) {
  6. return false;
  7. }
  8. }

代码示例来源:origin: org.jboss.eap/wildfly-client-all

  1. private static boolean supportsClone(Mac mac) {
  2. try {
  3. mac.clone();
  4. return true;
  5. } catch (CloneNotSupportedException e) {
  6. return false;
  7. }
  8. }

代码示例来源:origin: martint/jmxutils

  1. private static boolean supportsClone(Mac mac) {
  2. try {
  3. mac.clone();
  4. return true;
  5. } catch (CloneNotSupportedException e) {
  6. return false;
  7. }
  8. }

代码示例来源:origin: prestosql/presto

  1. private static boolean supportsClone(Mac mac) {
  2. try {
  3. mac.clone();
  4. return true;
  5. } catch (CloneNotSupportedException e) {
  6. return false;
  7. }
  8. }

代码示例来源:origin: com.github.nitram509/jmacaroons

  1. private static Mac createNewHmacInstance() throws NoSuchAlgorithmException {
  2. try {
  3. Mac clonedMac = (Mac) HMACSHA256_PROTOTYPE.clone();
  4. clonedMac.reset();
  5. return clonedMac;
  6. } catch (CloneNotSupportedException e) {
  7. return Mac.getInstance(HMAC_SHA_256_ALGO);
  8. }
  9. }

代码示例来源:origin: org.apache.drill/drill-shaded-guava

  1. @Override
  2. public Hasher newHasher() {
  3. if (supportsClone) {
  4. try {
  5. return new MacHasher((Mac) prototype.clone());
  6. } catch (CloneNotSupportedException e) {
  7. // falls through
  8. }
  9. }
  10. return new MacHasher(getMac(prototype.getAlgorithm(), key));
  11. }

代码示例来源:origin: org.apache.ratis/ratis-proto-shaded

  1. @Override
  2. public Hasher newHasher() {
  3. if (supportsClone) {
  4. try {
  5. return new MacHasher((Mac) prototype.clone());
  6. } catch (CloneNotSupportedException e) {
  7. // falls through
  8. }
  9. }
  10. return new MacHasher(getMac(prototype.getAlgorithm(), key));
  11. }

代码示例来源:origin: org.apache.hbase.thirdparty/hbase-shaded-miscellaneous

  1. @Override
  2. public Hasher newHasher() {
  3. if (supportsClone) {
  4. try {
  5. return new MacHasher((Mac) prototype.clone());
  6. } catch (CloneNotSupportedException e) {
  7. // falls through
  8. }
  9. }
  10. return new MacHasher(getMac(prototype.getAlgorithm(), key));
  11. }

相关文章