HOW TO ENCRYPT AND DECRYPT MESSAGE USING JAVA

Published: 14 December 2022
on channel: Programming Tutorial
240
like

#encryption #decryption #encryptdecryptusingjava #javacryptoghraphy
you can fork this tutorial on my github (https://github.com/AminTurmudiYusup/s...)
HOW TO ENCRYPT AND DECRYPT MESSAGE USING JAVA
1. you understand how to create maven project using intellij Idea
2. you Undestand the concept of Symetric encryption
3. you Understand the concept of plaintext and ciphertext

see my maven project structure

Let's jump right in
ENCRYPT
1. create class which have function to create secret key, create salt, encrypt data, encode secret key, encode salt
2. create function to create secretkey
3. create function to create IvParameterSpec as salt/random string
4. create function to encrypt data
5. input data to encrpt(success to encrypt data)
6. create function to encode secretkey
7. create function to encode salt/ivParameterSpec
NOTE : after encode, send secretkey and salt to client which needed



store the information to use when decrypt
Encrypted Text ** gDzEFOtNt/M1k/elLJ4tcw==(this is ciphertext)
Secret Key encode** YUlqyf+7XV+fb29adQV3K9Cs44Q6l7huT2AoCd8XBUY=(this is secretkey)
ivParameterSpec Encode** pptwLaru2bUnLCq2LbgFAg==(this is salt/random string)

DECRYPT(send private key, salt and data already encrypted)
1. Create class which have function to decode secret key, decode salt(ivParameterSpec), and decrypt the ciphertext
2. create function to decode secret key
3. create function to decode salt/ivParameterSpec
4. create function to decrypt ciphertext into plaintext
5. in encryption process the plaintext is =AMIN TURMUDI
6. try to run program

Success, happy learning and happy sharing!! you can fork this tutorial on my github


In the next tutorial i will show you, how to encrypt decrypt sensitiv data in spring boot using symetric encryption


On this page of the site you can watch the video online HOW TO ENCRYPT AND DECRYPT MESSAGE USING JAVA with a duration of hours minute second in good quality, which was uploaded by the user Programming Tutorial 14 December 2022, share the link with friends and acquaintances, this video has already been watched 240 times on youtube and it was liked by like viewers. Enjoy your viewing!