encrypt icon indicating copy to clipboard operation
encrypt copied to clipboard

🔒 A set of high-level APIs over PointyCastle for two-way cryptography.

Results 87 encrypt issues
Sort by recently updated
recently updated
newest added

Hi, i need to create a random IV and save it as String for using it later. Can someone put an example of how to do that?

support

Hi, I look google "RSA" and all the example and generators creates a public and private key but they contain alphanumeric and as well as "/#%@" type characters. How to...

support

Use this part of the code: RSAAsymmetricKey _parsePublic(ASN1Sequence sequence) { final modulus = (sequence.elements[0] as ASN1Integer).valueAsBigInteger; final exponent = (sequence.elements[1] as ASN1Integer).valueAsBigInteger; return RSAPublicKey(modulus, exponent); } The modules I obtained...

support

import java.io.UnsupportedEncodingException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.SecureRandom; import javax.crypto.BadPaddingException; import javax.crypto.Cipher; import javax.crypto.IllegalBlockSizeException; import javax.crypto.KeyGenerator; import javax.crypto.NoSuchPaddingException; import javax.crypto.SecretKey; import javax.crypto.spec.SecretKeySpec; public static byte[] encrypt(String content, String password) {...

support

Hi, My private key is encrypted with a passphrase and the syntax starts with the following: ``` -----BEGIN RSA PRIVATE KEY----- Proc-Type: 4,ENCRYPTED ``` What would be a workaround for...

bug
help wanted

When trying to parse a `.pem`, we need the `RSAPrivateKey` and `RSAPublicKey`, but this model is not being exported outside of the lib. This fix the linter: https://dart-lang.github.io/linter/lints/depend_on_referenced_packages.html closes: #227,...

I have this from flutter: `Encrypter(AES(Key.fromBase64(key))).encrypt(input, iv: _iv).base64` Now I want to decrypt that from javascript, could you give some docs about this? Many thanks!

This is the working JS Code ```html var encrypted_json_string = '{"ciphertext":"J15WHQVaxi+9CX3+nQ5i0wUkpGY3F6F/j88KZYjnnRmuvtj2ilCYCuMVmrdVcMP7oQ0L7PsNg4VfDzjuxenARw==","iv":"9eccead954fc693a4ad79925a88099e9","salt":"967cf362b3a91e99053a0c7825899316679fb39284c45feec41773a7f30558fddbabcb9256cad113ac32c3fe4c27d55a6387fcee2bfb032973f859aae1add32629c70453343cd8d7be460652210875b028a1bde0ebb27b64e11ab80bc005e04cbde2e60dac68a3c2a8464d188d9db8dad3217683cc36b5dcd84ef6e552998e9e8a062e05c10d8449825607f5d1950946a0d58a02d0c5ea809ff6a122845d8f155da952f3d1b4bc0792f463c848e8d8570db89d49c14886454cad99abeab3159a0f8a24d923c701c6a7462692792dc28eb1d5bebfc22655110e7520738103a94e5a81c5e647e088d62688503c5381a3c529aa688b08a3203b05f994eaf3c824ed"}'; function CryptoJSAesDecrypt(passphrase) { var obj_json = JSON.parse(encrypted_json_string); var encrypted = obj_json.ciphertext; var salt = CryptoJS.enc.Hex.parse(obj_json.salt); var iv = CryptoJS.enc.Hex.parse(obj_json.iv);...

我这边转成16进制 然后在增加16位 才能得出正确答案。

Getting below error with latest version encrypt 5.0.3 [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Invalid argument(s): Invalid or corrupted pad block #0 PKCS7Padding.padCount (package:pointycastle/paddings/pkcs7.dart:47:9) #1 PaddedBlockCipherImpl.doFinal (package:pointycastle/padded_block_cipher/padded_block_cipher_impl.dart:112:30) #2 PaddedBlockCipherImpl.process (package:pointycastle/padded_block_cipher/padded_block_cipher_impl.dart:74:25) #3 AES.decrypt (package:encrypt/src/algorithms/aes.dart:68:22)...