encryption

Create a Stored Procedure for AES Encryption in MS SQL Server 2008

送分小仙女□ 提交于 2020-12-29 08:44:23
问题 I have an SQL Server 2008 table with a structure similar to the following: ID int PRIMARY KEY IDENTITY(1,1) Name nvarchar(100) LongText ntext What I am trying to achieve is simple. Before inserting data inside this table, I want to encrypt the LongText using AES_192 algorithm. I am using the following SP to encrypt data: create proc sp_Encrypt_LongText @rawText ntext = null, @encryptedText nvarchar(max) output as begin OPEN SYMMETRIC KEY Encryption_Symmetric_Key DECRYPTION BY CERTIFICATE

Create a Stored Procedure for AES Encryption in MS SQL Server 2008

ⅰ亾dé卋堺 提交于 2020-12-29 08:44:16
问题 I have an SQL Server 2008 table with a structure similar to the following: ID int PRIMARY KEY IDENTITY(1,1) Name nvarchar(100) LongText ntext What I am trying to achieve is simple. Before inserting data inside this table, I want to encrypt the LongText using AES_192 algorithm. I am using the following SP to encrypt data: create proc sp_Encrypt_LongText @rawText ntext = null, @encryptedText nvarchar(max) output as begin OPEN SYMMETRIC KEY Encryption_Symmetric_Key DECRYPTION BY CERTIFICATE

Issue when opening a DOCX file through a third party app using IOCipher and ContentProvider

我的梦境 提交于 2020-12-29 07:56:24
问题 I'm building a secure android application that runs with IOCipher and SQLCipher. My app is storing PDF, DOC, DOCX, XLS, XLSX files that are intended to be openned by a third party application. Currently I can open all these type of files but DOCX . When I open a docx file that is stored in IOCipher using this method: File file = new File(path); Uri contentUri = Uri.parse(VFSContentProvider.FILES_URI + file.getName()); Intent intent = new Intent(); intent.setAction(Intent.ACTION_VIEW); intent

Using machine keys for IDataProtector - ASP.NET CORE

馋奶兔 提交于 2020-12-29 05:48:33
问题 is there a way that you can specify a separate encryption and validation key. Currently, there is just one master key that does both validation and encryption. However, we have several applications in a web farm and only one of them run on ASP.NET CORE and this is hosted on IIS. The rest of the application (Running on ASP.NET *Not core) use the same machine key. The machine key has, of course, the decryption and validation keys and all the other applications use this same machine key to

How to add salt to AES Encryption in iOS and decrypting it using objective c

人走茶凉 提交于 2020-12-21 04:19:32
问题 I have appended the IV to the AES Encryption/decryption code by using objective c in iOS and able to decrypt and encrypt the same. Right now I am trying to add the salt to the AES Encryption but unfortunately its not working for me. Here is the code: I have also edited with Android salt generation code for just to check whether my salt generation is valid or not in iOS Encryption code: + (NSData*)encryptData:(NSData*)data key:(NSData*)key error:(NSError **)error; { NSData *salt = [self

How to add salt to AES Encryption in iOS and decrypting it using objective c

不打扰是莪最后的温柔 提交于 2020-12-21 04:18:25
问题 I have appended the IV to the AES Encryption/decryption code by using objective c in iOS and able to decrypt and encrypt the same. Right now I am trying to add the salt to the AES Encryption but unfortunately its not working for me. Here is the code: I have also edited with Android salt generation code for just to check whether my salt generation is valid or not in iOS Encryption code: + (NSData*)encryptData:(NSData*)data key:(NSData*)key error:(NSError **)error; { NSData *salt = [self

Encrypting file in Node via Crypto and Stream

两盒软妹~` 提交于 2020-12-16 06:11:47
问题 I want to read from a stream then encrypt it and finally write it to another file. This is my code: var fs = require('fs'); var crypto = require('crypto'); var infile = fs.createReadStream('a.dmg'); var outfile = fs.createWriteStream('b.dmg'); var encrypt = crypto.createCipher('aes192', 'behdad'); var size = fs.statSync('a.dmg').size; console.log(size); infile.on('data',function(data) { var percentage = parseInt(infile.bytesRead) / parseInt(size); console.log(percentage * 100); var encrypted

Spark + EMRFS/S3 - Is there a way to read client side encrypted data and write it back using server side encryption?

元气小坏坏 提交于 2020-12-14 06:38:46
问题 I have a use-case in spark where I have to read data from a S3 that uses client-side encryption, process it and write it back using only server-side encryption. I'm wondering if there's a way to do this in spark? Currently, I have these options set: spark.hadoop.fs.s3.cse.enabled=true spark.hadoop.fs.s3.enableServerSideEncryption=true spark.hadoop.fs.s3.serverSideEncryption.kms.keyId=<kms id here> But obviously, it's ending up using both CSE and SSE while writing the data. So, I'm wondering

Spark + EMRFS/S3 - Is there a way to read client side encrypted data and write it back using server side encryption?

ε祈祈猫儿з 提交于 2020-12-14 06:36:56
问题 I have a use-case in spark where I have to read data from a S3 that uses client-side encryption, process it and write it back using only server-side encryption. I'm wondering if there's a way to do this in spark? Currently, I have these options set: spark.hadoop.fs.s3.cse.enabled=true spark.hadoop.fs.s3.enableServerSideEncryption=true spark.hadoop.fs.s3.serverSideEncryption.kms.keyId=<kms id here> But obviously, it's ending up using both CSE and SSE while writing the data. So, I'm wondering

Decrypt AES/CBC/PKCS5Padding Encryption in Dart

无人久伴 提交于 2020-12-13 03:33:16
问题 I am already having encryption code in java. Now I want to consume APIs from my server. Even after trying various tutorials and sample codes I am not able to successfully decrypt the hash. I know fixed salt and IV is not recommended at all. But for simplicity and to understand the issue I have kept salt and IV to "00000000000000000000000000000000"; Hash After Encryption from Java = "XjxCg0KK0ZDWa4XMFhykIw=="; Private key used = "Mayur12354673645" Can someone please help me to decrypt above