Jerry Girgich

Ranch Hand
+ Follow
since Apr 28, 2017
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Jerry Girgich

and I am using Java for it
6 years ago
You have to use programming to actually get the SNS to send a notification to a device.
6 years ago
So I am trying to generate a push notification through Amazon SNS and I am getting this error message.

Caught an AmazonServiceException, which means your request made it to Amazon SNS, but was rejected with an error response for some reason.
Error Message:    The security token included in the request is invalid. (Service: AmazonSNS; Status Code: 403; Error Code: InvalidClientTokenId; Request ID: cf4cbbd5-82e3-5945-9be7-ea3366882153)
HTTP Status Code: 403
AWS Error Code:   InvalidClientTokenId
Error Type:       Client
Request ID:       cf4cbbd5-82e3-5945-9be7-ea3366882153




I used online base64 to hex conversions to convert my device token (that I am pretty sure is in base64) to a hex which is needed and I am still getting the same error and I am not sure what else the issue could be.
6 years ago
Does anyone know if there is a keytool command that lets me extract the private key from a certificate that is in the format of p12.

I had to import the certificate from a file and then saved it to my desktop so I have it as both a .pem and a .p12. I'm not sure how to use keytool to get the private key.
6 years ago
I know that symmetric crypto is faster when compared to asymmetric crypto, but on average does anyone know about how much faster it would be when encrypting and decrypting a 2MB file?
6 years ago
I think I am pretty much stuck and I am not sure how to go forward
6 years ago

Henry Wong wrote:
Your decryptedKey() method... well ... doesn't do any decrypting at all. From the looks of it, it is doing some XML parsing?
Why are you doing that? Totally confused...




I am not sure, when my method was not working I googled some more and a lot of posts were saying to convert the byte to a String text which is what I did and I wasn't getting any errors from the code I posted.
6 years ago
I want to change the code for the decryptedTextHex:



Realized I made a mistake but it still gives me the same error.
6 years ago
So I was finally able to decrypt the key like this:




I am now going to decrypt the encrypted String with this decrypted key. Since the decrypted key is in the format String , I need to convert it back into a Key so this is what I did:




I am getting this error though and I am not sure how to fix it:

6 years ago

Stephan van Hulst wrote:I don't understand why you're working with Strings in the first place. Why don't you just work with byte arrays?

Also, why are you not using Cipher.wrap() and Cipher.unwrap() to encrypt/decrypt your symmetric key?




Well I am pretty new at all of this encryption and decryption so it would be great if you would actually help with what I have done instead of diminishing it completely.
6 years ago
How would I fix this error? Is there a better way to decode than what I did?
6 years ago
This is how I think I should be decrypting (not sure though)





I am getting this error though:

6 years ago
How would I use Base64 for decoding, I keep getting errors when I try to do the opposite of how I encrypted
6 years ago
Although I can't figure out the syntax for using Base 64 to decrypt the secret key
6 years ago
Never mind I am not decrypting with my private key like I need to which is the problem
6 years ago