首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏全栈程序员必看

    Bouncycastle_Bouncy什么意思

    BouncyCastle是一款开源的密码包,其中包含了大量的密码算法,使用BouncyCastle的目的就是为了扩充算法支持 下载地址最新加密组件包 http://www.bouncycastle.org 下载下来的加密组件包有以下两个: bcprov-ext-jdk15on-162.jar #用于配置方式使用 bcprov-jdk15on-162.jar #用于调用方式使用 2、BouncyCastle 修改 D:\InstallSoftHere\Java\jdk1.8.0_121\jre\lib\security目录下的java.security文件 security.provider.11=org.bouncycastle.jce.provider.BouncyCastleProvider 1) 将bcprov-jdk15on-162.jar文件导入相关工程 (2) 在需要使用加密的代码中导入以下两个类 import java.security.Security; import org.bouncycastle.jce.provider.BouncyCastleProvider

    1.8K40编辑于 2022-09-20
  • 来自专栏与神兽党一起成长

    在XMLSignature中使用BouncyCastle做RSA

    There is an article shows demo code for making XMLSignature by using Java XML Digital Signature API, where it actually uses org.jcp.xml.dsig.internal.dom.XMLDSigRI to do DOM formation, and the first provider in the java.security lookup order that will support SHA1 digestion, SHA1withRSA signing to do algorithm jobs.

    1K20发布于 2018-10-22
  • 来自专栏张善友的专栏

    在.NET Core 里使用 BouncyCastle 的DES加密算法

    等加密算法要等到1.2 才支持,我们可是急需这个算法的支持,文章《使用 JavaScriptService 在.NET Core 里实现DES加密算法》需要用Nodejs,很多人觉得这个有点不好,今天就给大家介绍下BouncyCastle (Portable.BouncyCastle)https://www.nuget.org/packages/Portable.BouncyCastle/库为我们提供的原生的.NET Core的支持库的 BouncyCastle的文档比较少,折腾了好久才写出了.NET 代码等价的一个封装。  

    1.8K70发布于 2018-01-19
  • 来自专栏小工匠聊架构

    加密与安全_面向密码学的开源库BouncyCastle

    BouncyCastle就是一个提供了丰富的哈希算法和加密算法的第三方库。它包含了Java标准库没有的一些算法,如RipeMD160哈希算法。 BouncyCastle 官网 https://www.bouncycastle.org/ BouncyCastle简介 Bouncy Castle 是一个面向密码学的开源库,提供了丰富的密码学算法实现 > <version>1.68</version> </dependency> Code package com.artisan.securityalgjava.bouncyCastle ; import org.bouncycastle.jce.provider.BouncyCastleProvider; import java.io.UnsupportedEncodingException 作为安全提供者: Security.addProvider(new BouncyCastleProvider()); // 使用BouncyCastle提供的RipeMD160

    1.1K00编辑于 2024-05-26
  • 来自专栏dotnet & java

    用Portable.BouncyCastle来进行加解密的代码demo

    用到的库是Portable.BouncyCastle。官网。 加密 因为要区别BouncyCastle中的MD5类,所以对引用取一下别名。

    1.6K20发布于 2019-03-06
  • 来自专栏DotNet NB && CloudNative

    Bouncy Castle :国密加密在.NET Core中的实践

    = "Hello, BouncyCastle!" ; using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Security; using System.Text; public static byte using BouncyCastleDemo; using Org.BouncyCastle.Asn1.GM; using Org.BouncyCastle.Crypto.Generators; using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Crypto.Parameters; using Org.BouncyCastle.Security; Org.BouncyCastle.Crypto.Paddings; using Org.BouncyCastle.Crypto.Parameters; using System.Text; string

    99710编辑于 2025-03-20
  • 来自专栏全栈程序员必看

    java 数字信封_【Java密码学】使用Bouncy Castle生成数字签名、数字信封

    ;importorg.bouncycastle.cms.CMSEnvelopedData;importorg.bouncycastle.cms.CMSEnvelopedDataGenerator;importorg.bouncycastle.cms.CMSProcessableByteArray ;importorg.bouncycastle.cms.CMSSignedData;importorg.bouncycastle.cms.CMSSignedDataGenerator;importorg.bouncycastle.cms.CMSTypedData ;importorg.bouncycastle.cms.RecipientInformation;importorg.bouncycastle.cms.RecipientInformationStore ;importorg.bouncycastle.cms.SignerInformation;importorg.bouncycastle.cms.SignerInformationStore;importorg.bouncycastle.cms.jcajce.JcaSignerInfoGeneratorBuilder ;importorg.bouncycastle.util.Store;importorg.bouncycastle.util.encoders.Base64;public classMessageUtil

    2.1K20编辑于 2022-11-15
  • 来自专栏JAVA乐园

    常见对称加密

    默认密钥长度: 64 工作模式:CBC 填充方式:PKCS5Padding、PKCS7Padding、ISO10126Padding、ZeroBytePadding 备注: BouncyCastle 默认密钥长度: 64 工作模式:CBC 填充方式:PKCS5Padding、PKCS7Padding、ISO10128Padding、ZeroBytePadding 备注: BouncyCastle 默认密钥长度:128 工作模式: CBC 填充方式:PKCS5Padding、PKCS7Padding、ISO10131Padding、ZeroBytePadding 备注: BouncyCastle 默认密钥长度:40 工作模式:CBC 填充方式:PKCS5Padding、PKCS7Padding、ISO10134Padding、ZeroBytePadding 备注: BouncyCastle 默认密钥长度:40 工作模式: CBC 填充方式:PKCS5Padding、PKCS7Padding、ISO10136Padding、ZeroBytePadding 备注:BouncyCastle

    1.3K20发布于 2020-06-12
  • 来自专栏小工匠聊架构

    加密与安全_PGP、OpenPGP和GPG加密通信协议

    ; import org.bouncycastle.openpgp.PGPEncryptedDataGenerator; import org.bouncycastle.openpgp.PGPException ; import org.bouncycastle.openpgp.PGPException; import org.bouncycastle.openpgp.PGPPrivateKey; import org.bouncycastle.openpgp.PGPSecretKeyRingCollection; import org.bouncycastle.openpgp.PGPUtil; import org.bouncycastle.openpgp.PGPPublicKeyRing; import org.bouncycastle.openpgp.PGPPublicKeyRingCollection ; import org.bouncycastle.openpgp.PGPUtil; import org.bouncycastle.openpgp.jcajce.JcaPGPObjectFactory

    2.3K00编辑于 2024-05-26
  • 来自专栏雨临Lewis的博客

    PGP加解密

    ; import org.bouncycastle.bcpg.CompressionAlgorithmTags; import org.bouncycastle.bcpg.HashAlgorithmTags ; import org.bouncycastle.openpgp.PGPException; import org.bouncycastle.openpgp.PGPLiteralData; import org.bouncycastle.openpgp.PGPObjectFactory; import org.bouncycastle.openpgp.PGPOnePassSignature; import org.bouncycastle.openpgp.PGPPublicKeyRing; import org.bouncycastle.openpgp.PGPPublicKeyRingCollection org.bouncycastle.openpgp.PGPSignatureList; import org.bouncycastle.openpgp.PGPUtil; import org.bouncycastle.openpgp.jcajce.JcaPGPObjectFactory

    2.4K30编辑于 2023-07-11
  • [C#]C#实现RSA加密解密

    安装 BouncyCastle 这个Nuget包 PM > Install-Package BouncyCastle BouncyCastle项目网址 BouncyCastlegithub地址 构造一个 RSAKeyConventer类 namespace RSA { using System; using System.Security.Cryptography; using Org.BouncyCastle.Asn1 .Pkcs; using Org.BouncyCastle.Math; using Org.BouncyCastle.Pkcs; using Org.BouncyCastle.Asn1 .X509; using Org.BouncyCastle.X509; using Org.BouncyCastle.Security; using Org.BouncyCastle.Crypto.Parameters

    54200编辑于 2025-07-20
  • 来自专栏软件研发

    解决Caused by: java.lang.IllegalStateException:

    正在处理的类层次结构是[org.bouncycastle.asn1.ASN1EncodableVector->org.bouncycastle.asn1.DEREncodableVector->org.bouncycastle.asn1 根据异常消息中提到的类层次结构,我们可以看到​​org.bouncycastle.asn1.ASN1EncodableVector​​类之间存在循环继承依赖关系。 假设我们的应用程序包含以下类结构:javaCopy codepackage org.example;import org.bouncycastle.asn1.ASN1EncodableVector;public ; } public CustomVector getVector() { return vector; }}现在我们的应用程序在启动时抛出了异常,并提到了​​org.bouncycastle.asn1 .ASN1EncodableVector->org.bouncycastle.asn1.DEREncodableVector->org.bouncycastle.asn1.ASN1EncodableVector​​

    4.3K50编辑于 2023-11-02
  • 来自专栏一个会写诗的程序员的博客

    Caused by: java.lang.IllegalStateException: 由于StackOverflower错误,无法完成对web应用程序[/lib]的批注的扫描。可能的根本原因包...

    正在处理的类层次结构是[org.bouncycastle.asn1.ASN1EncodableVector->org.bouncycastle.asn1.DEREncodableVector->org.bouncycastle.asn1 正在处理的类层次结构是[org.bouncycastle.asn1.ASN1EncodableVector->org.bouncycastle.asn1.DEREncodableVector->org.bouncycastle.asn1

    3.4K20编辑于 2022-09-01
  • 来自专栏影子

    小程序安全键盘&SM2解密方式

    bcprov-jdk15on</artifactId> <version>1.67</version> </dependency> <dependency> <groupId>org.bouncycastle ; import org.bouncycastle.crypto.params.ECPrivateKeyParameters; import org.bouncycastle.crypto.params.ECPublicKeyParameters ; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.bouncycastle.pqc.math.linearalgebra.ByteUtils ; import org.bouncycastle.crypto.params.ECPrivateKeyParameters; import org.bouncycastle.crypto.params.ECPublicKeyParameters ; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.bouncycastle.pqc.math.linearalgebra.ByteUtils

    1.4K41编辑于 2023-10-16
  • 来自专栏Java面试教程

    免费注册目前最好用的国产大模型

    具有七类能力 包括文本、推理、语言理解、数学、编程、问答、多模态等等 而且可以支持语音的输入和输出 我们先做个简单的实验: 写代码 我:用Java写一个SM2加密算法 星火: import org.bouncycastle.crypto.engines.SM2Engine ; import org.bouncycastle.crypto.params.ECPrivateKeyParameters; import org.bouncycastle.crypto.params.ECPublicKeyParameters ; import org.bouncycastle.crypto.params.ParametersWithRandom; import org.bouncycastle.crypto.util.PrivateKeyFactory ; import org.bouncycastle.crypto.util.PublicKeyFactory; import org.bouncycastle.util.encoders.Hex; public

    63630编辑于 2023-07-08
  • 来自专栏JAVA乐园

    Java 如何加载带密码的 PCKS8 PEM 私钥

    Java 自带的 API 没有找到,如果需要实现加载带密码的 RSA 需要用到 bouncycastle 库。 在百度搜索,几乎搜索不到。 .pkcs.PrivateKeyInfo; import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.bouncycastle.openssl.PEMEncryptedKeyPair ; import org.bouncycastle.openssl.PEMKeyPair; import org.bouncycastle.openssl.PEMParser; import org.bouncycastle.openssl.bc.BcPEMDecryptorProvider ; import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter; import org.bouncycastle.operator.InputDecryptorProvider ; import org.bouncycastle.pkcs.PKCS8EncryptedPrivateKeyInfo; import org.bouncycastle.pkcs.PKCSException

    2K10编辑于 2022-12-05
  • 来自专栏蔻丁杂记

    C# RSA 加密,解密与签名,验证签名

    掘金 C# RSA加密、解密、加签、验签、支持JAVA格式公钥私钥、PEM格式公钥私钥、.NET格式公钥私钥 -变态模式【支持私钥加密,公钥解密】(二) - kevin860 - 博客园 使用的库 bouncycastle bouncycastle.org NuGet Gallery | BouncyCastle 1.8.6.1 加密解密 加密解密相关的代码,见: 第一篇博客的代码整理 加密解密2 C# RSA加密、解密 格式公钥私钥、PEM格式公钥私钥、.NET格式公钥私钥、一般模式【支持公钥加密,私钥解密】(一) - kevin860 - 博客园 签名,验证签名 #region 加签///

    /// 基于BouncyCastle return Convert.ToBase64String(signer.GenerateSignature());}#endregion #region 验签/// /// 基于BouncyCastle

    1K10编辑于 2024-12-25
  • 来自专栏架构之巅

    国密算法sm2-.Net实现

    依赖类库: 5dccd019a893fbf2fd0b75790209451.png talk is cheap,show me the code using Org.BouncyCastle.Asn1. GM; using Org.BouncyCastle.Crypto; using Org.BouncyCastle.Crypto.Digests; using Org.BouncyCastle.Crypto.Engines ; using Org.BouncyCastle.Crypto.Generators; using Org.BouncyCastle.Crypto.Parameters; using Org.BouncyCastle.Crypto.Signers ; using Org.BouncyCastle.Math; using Org.BouncyCastle.Security; using Org.BouncyCastle.Utilities.Encoders

    2.2K42发布于 2021-08-18
  • 来自专栏全栈程序员必看

    用bc做国密sm2加解密、SM3withSM2签名验签等

    import org.apache.commons.codec.binary.Base64; import org.bouncycastle.asn1.*; import org.bouncycastle.asn1 .gm.GMNamedCurves; import org.bouncycastle.asn1.x500.X500Name; import org.bouncycastle.asn1.x500.X500NameBuilder ; import org.bouncycastle.asn1.x500.style.BCStyle; import org.bouncycastle.asn1.x9.X9ECParameters; import org.bouncycastle.crypto.InvalidCipherTextException; import org.bouncycastle.crypto.digests.SM3Digest ; import org.bouncycastle.math.ec.ECPoint; import org.bouncycastle.operator.ContentSigner; import org.bouncycastle.operator.jcajce.JcaContentSignerBuilder

    3.1K20编辑于 2022-09-30
  • 来自专栏站长的编程笔记

    实现在Java环境中使用SM2加密算法

    引入并使用SM2相关库 我们可以选择使用BouncyCastle库,它提供了广泛的加密和哈希函数,包括SM2。 首先,要在项目中引用BouncyCastle库,这可以通过maven的pom.xml完成。 <dependencies>     <dependency>         <groupId>org.bouncycastle</groupId>         <artifactId>bcprov-jdk15on </artifactId>         <version>1.64</version>     </dependency> </dependencies> 然后,我们需要初始化BouncyCastle

    3.5K40编辑于 2023-10-02
领券