Package org.bouncycastle.crypto.digests

Examples of org.bouncycastle.crypto.digests.SHA256Digest


    static public class ecNR256
        extends JDKDSASigner
    {
        public ecNR256()
        {
            super("SHA256withECNR", new SHA256Digest(), new ECNRSigner());
        }
View Full Code Here


    static public class ecDSA256
        extends JDKDSASigner
    {
        public ecDSA256()
        {
            super("SHA256withECDSA", new SHA256Digest(), new ECDSASigner());
        }
View Full Code Here

    static public class ecNR256
        extends JDKDSASigner
    {
        public ecNR256()
        {
            super("SHA256withECNR", new SHA256Digest(), new ECNRSigner());
        }
View Full Code Here

        {
            return new SHA224Digest();
        }
        if (sha256.contains(digestName))
        {
            return new SHA256Digest();
        }
        if (sha384.contains(digestName))
        {
            return new SHA384Digest();
        }
View Full Code Here

        {
            return new SecureRandom(new DigestRandomGenerator(new SHA1Digest()));
        }
        if (algorithm.equals("SHA256PRNG"))
        {
            return new SecureRandom(new DigestRandomGenerator(new SHA256Digest()));
        }
        return new SecureRandom();    // follow old behaviour
    }
View Full Code Here

  {
    if ( priv == null )
    {
      throw new ValidationException ("Need private key to sign");
    }
    ECDSASigner signer = new ECDSASigner (new HMacDSAKCalculator (new SHA256Digest ()));
    signer.init (true, new ECPrivateKeyParameters (priv, domain));
    BigInteger[] signature = signer.generateSignature (hash);
    ByteArrayOutputStream s = new ByteArrayOutputStream ();
    try
    {
View Full Code Here

        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:
View Full Code Here

    private static byte[] _cryptIES(byte[] input, Key recipient,
            boolean forEncryption) throws InvalidKeyException,
            IllegalBlockSizeException, BadPaddingException {
        IESCipher cipher = new IESCipher(new IESEngine(
                new ECDHBasicAgreement(), new KDF2BytesGenerator(
                        new SHA1Digest()), new HMac(new SHA256Digest()),
                new PaddedBufferedBlockCipher(new CBCBlockCipher(
                        new AESEngine()))));

        cipher.engineInit(forEncryption ? Cipher.ENCRYPT_MODE
                : Cipher.DECRYPT_MODE, recipient, new SecureRandom());
View Full Code Here

    static public class dsa256
        extends JDKDSASigner
    {
        public dsa256()
        {
            super(new SHA256Digest(), new DSASigner());
        }
View Full Code Here

    static public class ecDSA256
        extends Signature
    {
        public ecDSA256()
        {
            super(new SHA256Digest(), new ECDSASigner(), new StdDSAEncoder());
        }
View Full Code Here

TOP

Related Classes of org.bouncycastle.crypto.digests.SHA256Digest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.