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

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

本文整理了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

private static boolean supportsClone(Mac mac) {
 try {
  mac.clone();
  return true;
 } catch (CloneNotSupportedException e) {
  return false;
 }
}

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

private static boolean supportsClone(Mac mac) {
 try {
  mac.clone();
  return true;
 } catch (CloneNotSupportedException e) {
  return false;
 }
}

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

private static boolean supportsClone(Mac mac) {
 try {
  mac.clone();
  return true;
 } catch (CloneNotSupportedException e) {
  return false;
 }
}

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

private static boolean supportsClone(Mac mac) {
 try {
  mac.clone();
  return true;
 } catch (CloneNotSupportedException e) {
  return false;
 }
}

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

private Mac getMac() {
  // Mac is not thread-safe. Requires a new clone for each signature.
  try {
   return (Mac) mac.clone();
  } catch (CloneNotSupportedException e) {
   throw new IllegalStateException(e);
  }
 }
}

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

@Override
public Hasher newHasher() {
 if (supportsClone) {
  try {
   return new MacHasher((Mac) prototype.clone());
  } catch (CloneNotSupportedException e) {
   // falls through
  }
 }
 return new MacHasher(getMac(prototype.getAlgorithm(), key));
}

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

@Override
public Hasher newHasher() {
 if (supportsClone) {
  try {
   return new MacHasher((Mac) prototype.clone());
  } catch (CloneNotSupportedException e) {
   // falls through
  }
 }
 return new MacHasher(getMac(prototype.getAlgorithm(), key));
}

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

@Override
public Hasher newHasher() {
 if (supportsClone) {
  try {
   return new MacHasher((Mac) prototype.clone());
  } catch (CloneNotSupportedException e) {
   // falls through
  }
 }
 return new MacHasher(getMac(prototype.getAlgorithm(), key));
}

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

@Override
public Hasher newHasher() {
 if (supportsClone) {
  try {
   return new MacHasher((Mac) prototype.clone());
  } catch (CloneNotSupportedException e) {
   // falls through
  }
 }
 return new MacHasher(getMac(prototype.getAlgorithm(), key));
}

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

private static boolean supportsClone(Mac mac) {
 try {
  mac.clone();
  return true;
 } catch (CloneNotSupportedException e) {
  return false;
 }
}

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

private static boolean supportsClone(Mac mac) {
 try {
  mac.clone();
  return true;
 } catch (CloneNotSupportedException e) {
  return false;
 }
}

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

private static boolean supportsClone(Mac mac) {
 try {
  mac.clone();
  return true;
 } catch (CloneNotSupportedException e) {
  return false;
 }
}

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

private static boolean supportsClone(Mac mac) {
 try {
  mac.clone();
  return true;
 } catch (CloneNotSupportedException e) {
  return false;
 }
}

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

private static boolean supportsClone(Mac mac) {
 try {
  mac.clone();
  return true;
 } catch (CloneNotSupportedException e) {
  return false;
 }
}

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

private static boolean supportsClone(Mac mac) {
 try {
  mac.clone();
  return true;
 } catch (CloneNotSupportedException e) {
  return false;
 }
}

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

private static boolean supportsClone(Mac mac) {
 try {
  mac.clone();
  return true;
 } catch (CloneNotSupportedException e) {
  return false;
 }
}

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

private static Mac createNewHmacInstance() throws NoSuchAlgorithmException {
 try {
  Mac clonedMac = (Mac) HMACSHA256_PROTOTYPE.clone();
  clonedMac.reset();
  return clonedMac;
 } catch (CloneNotSupportedException e) {
  return Mac.getInstance(HMAC_SHA_256_ALGO);
 }
}

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

@Override
public Hasher newHasher() {
 if (supportsClone) {
  try {
   return new MacHasher((Mac) prototype.clone());
  } catch (CloneNotSupportedException e) {
   // falls through
  }
 }
 return new MacHasher(getMac(prototype.getAlgorithm(), key));
}

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

@Override
public Hasher newHasher() {
 if (supportsClone) {
  try {
   return new MacHasher((Mac) prototype.clone());
  } catch (CloneNotSupportedException e) {
   // falls through
  }
 }
 return new MacHasher(getMac(prototype.getAlgorithm(), key));
}

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

@Override
public Hasher newHasher() {
 if (supportsClone) {
  try {
   return new MacHasher((Mac) prototype.clone());
  } catch (CloneNotSupportedException e) {
   // falls through
  }
 }
 return new MacHasher(getMac(prototype.getAlgorithm(), key));
}

相关文章