Java 类org.bouncycastle.crypto.digests.MD2Digest 实例源码

项目:ipack    文件:MD2.java   
public Object clone()
    throws CloneNotSupportedException
{
    Digest d = (Digest)super.clone();
    d.digest = new MD2Digest((MD2Digest)digest);

    return d;
}
项目:gwt-crypto    文件:BcImplProvider.java   
static Digest createDigest(int algorithm)
    throws PGPException
{
    switch (algorithm)
    {
    case HashAlgorithmTags.SHA1:
        return new SHA1Digest();
    case HashAlgorithmTags.SHA224:
        return new SHA224Digest();
    case HashAlgorithmTags.SHA256:
        return new SHA256Digest();
    case HashAlgorithmTags.SHA384:
        return new SHA384Digest();
    case HashAlgorithmTags.SHA512:
        return new SHA512Digest();
    case HashAlgorithmTags.MD2:
        return new MD2Digest();
    case HashAlgorithmTags.MD5:
        return new MD5Digest();
    case HashAlgorithmTags.RIPEMD160:
        return new RIPEMD160Digest();
    case HashAlgorithmTags.TIGER_192:
        return new TigerDigest();
    default:
        throw new PGPException("cannot recognise digest");
    }
}
项目:vsDiaryWriter    文件:Digesters.java   
private static void initDigesters() {
    digesters.put("Blake2b", Blake2bDigest.class);
    digesters.put("GOST3411", GOST3411Digest.class);
    digesters.put("Keccak", KeccakDigest.class);
    digesters.put("MD2", MD2Digest.class);
    digesters.put("MD4", MD4Digest.class);
    digesters.put("MD5", MD5Digest.class);
    digesters.put("RIPEMD128", RIPEMD128Digest.class);
    digesters.put("RIPEMD160", RIPEMD160Digest.class);
    digesters.put("RIPEMD256", RIPEMD256Digest.class);
    digesters.put("RIPEMD320", RIPEMD320Digest.class);
    digesters.put("SHA1", SHA1Digest.class);
    digesters.put("SHA224", SHA224Digest.class);
    digesters.put("SHA256", SHA256Digest.class);
    digesters.put("SHA384", SHA384Digest.class);
    digesters.put("SHA3-512", SHA3Digest.class);
    digesters.put("SHA3-256", SHA3Digest.class);
    digesters.put("SHA3-224", SHA3Digest.class);
    digesters.put("SHA3-384", SHA3Digest.class);
    digesters.put("SHA512", SHA512Digest.class);
    digesters.put("SHAKE-128", SHAKEDigest.class);
    digesters.put("SHAKE-256", SHAKEDigest.class);
    digesters.put("Skein256", SkeinDigest.class);
    digesters.put("Skein512", SkeinDigest.class);
    digesters.put("Skein1024", SkeinDigest.class);
    digesters.put("SM3", SM3Digest.class);
    digesters.put("Tiger", TigerDigest.class);
    digesters.put("Whirlpool", WhirlpoolDigest.class);
}
项目:Aki-SSL    文件:MD2.java   
public Object clone()
    throws CloneNotSupportedException
{
    Digest d = (Digest)super.clone();
    d.digest = new MD2Digest((MD2Digest)digest);

    return d;
}
项目:Java-Security    文件:MD2.java   
/**
 * Creates a new MD2 digest that may optionally be initialized with random
 * data.
 *
 * @param randomize
 *            True to randomize initial state of digest, false otherwise.
 */
public MD2(final boolean randomize) {
    super(new MD2Digest());
    if (randomize) {
        setRandomProvider(new SecureRandom());
        setSalt(getRandomSalt());
    }
}
项目:CryptMeme    文件:BcImplProvider.java   
static Digest createDigest(int algorithm)
    throws PGPException
{
    switch (algorithm)
    {
    case HashAlgorithmTags.SHA1:
        return new SHA1Digest();
    case HashAlgorithmTags.SHA224:
        return new SHA224Digest();
    case HashAlgorithmTags.SHA256:
        return new SHA256Digest();
    case HashAlgorithmTags.SHA384:
        return new SHA384Digest();
    case HashAlgorithmTags.SHA512:
        return new SHA512Digest();
    case HashAlgorithmTags.MD2:
        return new MD2Digest();
    case HashAlgorithmTags.MD5:
        return new MD5Digest();
    case HashAlgorithmTags.RIPEMD160:
        return new RIPEMD160Digest();
    case HashAlgorithmTags.TIGER_192:
        return new TigerDigest();
    default:
        throw new PGPException("cannot recognise digest");
    }
}
项目:CryptMeme    文件:MD2.java   
public Object clone()
    throws CloneNotSupportedException
{
    Digest d = (Digest)super.clone();
    d.digest = new MD2Digest((MD2Digest)digest);

    return d;
}
项目:irma_future_id    文件:BcImplProvider.java   
static Digest createDigest(int algorithm)
    throws PGPException
{
    switch (algorithm)
    {
    case HashAlgorithmTags.SHA1:
        return new SHA1Digest();
    case HashAlgorithmTags.SHA224:
        return new SHA224Digest();
    case HashAlgorithmTags.SHA256:
        return new SHA256Digest();
    case HashAlgorithmTags.SHA384:
        return new SHA384Digest();
    case HashAlgorithmTags.SHA512:
        return new SHA512Digest();
    case HashAlgorithmTags.MD2:
        return new MD2Digest();
    case HashAlgorithmTags.MD5:
        return new MD5Digest();
    case HashAlgorithmTags.RIPEMD160:
        return new RIPEMD160Digest();
    case HashAlgorithmTags.TIGER_192:
        return new TigerDigest();
    default:
        throw new PGPException("cannot recognise digest");
    }
}
项目:irma_future_id    文件:MD2.java   
public Object clone()
    throws CloneNotSupportedException
{
    Digest d = (Digest)super.clone();
    d.digest = new MD2Digest((MD2Digest)digest);

    return d;
}
项目:bc-java    文件:BcImplProvider.java   
static Digest createDigest(int algorithm)
    throws PGPException
{
    switch (algorithm)
    {
    case HashAlgorithmTags.SHA1:
        return new SHA1Digest();
    case HashAlgorithmTags.SHA224:
        return new SHA224Digest();
    case HashAlgorithmTags.SHA256:
        return new SHA256Digest();
    case HashAlgorithmTags.SHA384:
        return new SHA384Digest();
    case HashAlgorithmTags.SHA512:
        return new SHA512Digest();
    case HashAlgorithmTags.MD2:
        return new MD2Digest();
    case HashAlgorithmTags.MD5:
        return new MD5Digest();
    case HashAlgorithmTags.RIPEMD160:
        return new RIPEMD160Digest();
    case HashAlgorithmTags.TIGER_192:
        return new TigerDigest();
    default:
        throw new PGPException("cannot recognise digest");
    }
}
项目:bc-java    文件:MD2.java   
public Object clone()
    throws CloneNotSupportedException
{
    Digest d = (Digest)super.clone();
    d.digest = new MD2Digest((MD2Digest)digest);

    return d;
}
项目:ipack    文件:MD2.java   
public Digest()
{
    super(new MD2Digest());
}
项目:ipack    文件:MD2.java   
public HashMac()
{
    super(new HMac(new MD2Digest()));
}
项目:ipack    文件:DigestSignatureSpi.java   
public MD2()
{
    super(PKCSObjectIdentifiers.md2, new MD2Digest(), new PKCS1Encoding(new RSABlindedEngine()));
}
项目:gwt-crypto    文件:MD2DigestTest.java   
MD2DigestTest()
{
    super(new MD2Digest(), messages, digests);
}
项目:gwt-crypto    文件:MD2DigestTest.java   
protected Digest cloneDigest(
    Digest digest)
{
    return new MD2Digest((MD2Digest)digest);
}
项目:Aki-SSL    文件:MD2.java   
public Digest()
{
    super(new MD2Digest());
}
项目:Aki-SSL    文件:MD2.java   
public HashMac()
{
    super(new HMac(new MD2Digest()));
}
项目:Aki-SSL    文件:DigestSignatureSpi.java   
public MD2()
{
    super(PKCSObjectIdentifiers.md2, new MD2Digest(), new PKCS1Encoding(new RSABlindedEngine()));
}
项目:fast-rsa-engine    文件:FastDigestSignatureSpi.java   
public MD2()
{
    super(PKCSObjectIdentifiers.md2, new MD2Digest(), new PKCS1Encoding(new NativeRSAEngine()));
}
项目:hash-bench    文件:BouncyCastleHasher.java   
public static final void register(final Map<String, Hasher> hashers) {
  hashers.put(BouncyCastleHasher.GOST,
          new BouncyCastleHasher(new GOST3411Digest()));
  hashers.put(BouncyCastleHasher.MD2,
          new BouncyCastleHasher(new MD2Digest()));
  hashers.put(BouncyCastleHasher.MD4,
          new BouncyCastleHasher(new MD4Digest()));
  hashers.put(BouncyCastleHasher.MD5,
          new BouncyCastleHasher(new MD5Digest()));
  hashers.put(BouncyCastleHasher.RIPEMD128,
          new BouncyCastleHasher(new RIPEMD128Digest()));
  hashers.put(BouncyCastleHasher.RIPEMD160,
          new BouncyCastleHasher(new RIPEMD160Digest()));
  hashers.put(BouncyCastleHasher.RIPEMD256,
          new BouncyCastleHasher(new RIPEMD256Digest()));
  hashers.put(BouncyCastleHasher.RIPEMD320,
          new BouncyCastleHasher(new RIPEMD320Digest()));
  hashers.put(BouncyCastleHasher.SHA1,
          new BouncyCastleHasher(new SHA1Digest()));
  hashers.put(BouncyCastleHasher.SHA224,
          new BouncyCastleHasher(new SHA224Digest()));
  hashers.put(BouncyCastleHasher.SHA256,
          new BouncyCastleHasher(new SHA256Digest()));
  hashers.put(BouncyCastleHasher.SHA3,
          new BouncyCastleHasher(new SHA3Digest()));
  hashers.put(BouncyCastleHasher.SHA384,
          new BouncyCastleHasher(new SHA384Digest()));
  hashers.put(BouncyCastleHasher.SHA512,
          new BouncyCastleHasher(new SHA512Digest()));
  hashers.put(BouncyCastleHasher.SHA512_T,
          new BouncyCastleHasher(new SHA512tDigest(7 * 8)));
  hashers.put(BouncyCastleHasher.SKEIN1024, new BouncyCastleHasher(
          new SkeinDigest(SkeinDigest.SKEIN_1024, Long.BYTES * 8)));
  hashers.put(BouncyCastleHasher.SKEIN256, new BouncyCastleHasher(
          new SkeinDigest(SkeinDigest.SKEIN_256, Long.BYTES * 8)));
  hashers.put(BouncyCastleHasher.SKEIN512, new BouncyCastleHasher(
          new SkeinDigest(SkeinDigest.SKEIN_512, Long.BYTES * 8)));
  hashers.put(BouncyCastleHasher.SM3,
          new BouncyCastleHasher(new SM3Digest()));
  hashers.put(BouncyCastleHasher.TIGER,
          new BouncyCastleHasher(new TigerDigest()));
  hashers.put(BouncyCastleHasher.WHIRLPOOL2,
          new BouncyCastleHasher(new WhirlpoolDigest()));
}
项目:subshare    文件:MACCalculatorFactoryImpl.java   
@Override
public MACCalculator _createMACCalculator() {
    final Digest digest = new MD2Digest();
    return new MACCalculatorImpl(new HMac(digest), digest.getDigestSize(), 0); // IV not supported - throws exception when passing ParameterWithIV
}
项目:AcademicTorrents-Downloader    文件:JDKDigestSignature.java   
public MD2WithRSAEncryption()
{
    super("MD2withRSA", md2, new MD2Digest(), new PKCS1Encoding(new RSAEngine()));
}
项目:Java-Security    文件:MD2.java   
/** Creates an uninitialized instance of an MD2 digest. */
public MD2() {
    super(new MD2Digest());
}
项目:CryptMeme    文件:MD2.java   
public Digest()
{
    super(new MD2Digest());
}
项目:CryptMeme    文件:MD2.java   
public HashMac()
{
    super(new HMac(new MD2Digest()));
}
项目:CryptMeme    文件:DigestSignatureSpi.java   
public MD2()
{
    super(PKCSObjectIdentifiers.md2, new MD2Digest(), new PKCS1Encoding(new RSABlindedEngine()));
}
项目:irma_future_id    文件:MD2DigestTest.java   
MD2DigestTest()
{
    super(new MD2Digest(), messages, digests);
}
项目:irma_future_id    文件:MD2DigestTest.java   
protected Digest cloneDigest(
    Digest digest)
{
    return new MD2Digest((MD2Digest)digest);
}
项目:irma_future_id    文件:MD2.java   
public Digest()
{
    super(new MD2Digest());
}
项目:irma_future_id    文件:MD2.java   
public HashMac()
{
    super(new HMac(new MD2Digest()));
}
项目:irma_future_id    文件:DigestSignatureSpi.java   
public MD2()
{
    super(PKCSObjectIdentifiers.md2, new MD2Digest(), new PKCS1Encoding(new RSABlindedEngine()));
}
项目:irma_future_id    文件:DigestSignatureSpi.java   
public MD2()
{
    super(PKCSObjectIdentifiers.md2, new MD2Digest(), new PKCS1Encoding(new RSABlindedEngine()));
}
项目:bc-java    文件:MD2DigestTest.java   
MD2DigestTest()
{
    super(new MD2Digest(), messages, digests);
}
项目:bc-java    文件:MD2DigestTest.java   
protected Digest cloneDigest(
    Digest digest)
{
    return new MD2Digest((MD2Digest)digest);
}
项目:bc-java    文件:MD2.java   
public Digest()
{
    super(new MD2Digest());
}
项目:bc-java    文件:MD2.java   
public HashMac()
{
    super(new HMac(new MD2Digest()));
}
项目:bc-java    文件:DigestSignatureSpi.java   
public MD2()
{
    super(PKCSObjectIdentifiers.md2, new MD2Digest(), new PKCS1Encoding(new RSABlindedEngine()));
}
项目:bc-java    文件:DigestSignatureSpi.java   
public MD2()
{
    super(PKCSObjectIdentifiers.md2, new MD2Digest(), new PKCS1Encoding(new RSABlindedEngine()));
}
项目:Java-Security    文件:MD2.java   
/**
 * Creates a new MD2 digest and initializes it with the given salt.
 *
 * @param salt
 *            Salt data used to initialize digest computation.
 */
public MD2(final byte[] salt) {
    super(new MD2Digest());
    setSalt(salt);
}