TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Omar Kh
NA
301
21.8k
how to encrypt string using AES 128 bit in c#?
Sep 17 2020 3:52 AM
I'm working on web application in asp.net with oracle Database12c I'm using aes128 stored procedure to encrypt the password here is the procedure that makes encryption
SET
SERVEROUTPUT
ON
;
DECLARE
l_user_id test.username%TYPE :=
'SCOTT'
;
l_user_psw VARCHAR2 (2000) :=
'mypassword123'
;
l_key VARCHAR2 (2000) :=
'1234567890999999'
;
l_mod NUMBER
:= DBMS_CRYPTO.ENCRYPT_AES128
+ DBMS_CRYPTO.CHAIN_CBC
+ DBMS_CRYPTO.PAD_PKCS5;
l_enc RAW (2000);
BEGIN
l_user_psw :=
DBMS_CRYPTO.encrypt (UTL_I18N.string_to_raw (l_user_psw,
'AR8MSWIN1256'
),
l_mod,
UTL_I18N.string_to_raw (l_key,
'AR8MSWIN1256'
));
DBMS_OUTPUT.put_line (
'Encrypted='
|| l_user_psw);
INSERT
INTO
test
VALUES
(l_user_id, l_user_psw);
dbms_output.put_line(
'done'
);
COMMIT
;
END
;
the result is
132BEDB1C2CDD8F23B5A619412C27B60
now I want to make identical Aes in c# I know I can call stored procedure from c# and get the same result but I want to make it using c# for security reasons I have tried many ways but ended up with different result! I need help please!
Reply
Answers (
1
)
Update data in Codefirst approach in asp.net entity framework
how to show checkbox list items in one line using C#