What is the proper way to encrypt table id?
See original GitHub issueHi,
Im using uuid for my primary keys but i want is to encode uuid before returning it to user.
for example:
{
id: "a3ae9976-94b4-46ce-afdd-76a665ee7316"
}
what i want to do is to make something like this:
let list = model.fetchAll().map((item) => {
return {id: encode(item.id)};
});
which will become
{
id: "45IOgC2FDfr5bkbS"
}
Best Regards, Jason Villalon
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
An overview of the column level SQL Server encryption
SQL Server encrypted column datatype should be VARBINARY. In our CustomerData table, the BankACCNumber column data type is Varchar(10).
Read more >Encrypt a Column of Data - SQL Server & Azure Synapse ...
This article describes how to encrypt a column of data by using symmetric encryption in SQL Server using Transact-SQL.
Read more >Column-Level SQL Server Encryption Example Using SQL ...
1. In Object Explorer, right-click the Person table and select Encrypt Columns. Encrypting columns in SSMS. 2. In the Always Encrypted ...
Read more >what is a good way to encrypt a id in a url? - Stack Overflow
Use HTTPS, everything is encrypted except the address portion of the URL. – zaph. Sep 2, 2016 at 17:28. 4.
Read more >Encrypt And Decrypt Column Data In SQL Server - C# Corner
Symmetric Key - can be encrypted by using many options, like certificate, password, symmetric key. There are different algorithms available for ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi!
Thank you for your reply. the combination of your 2 suggestions solved my problem.
what happen is all primary keys which is “id” is added as hidden using visiblity plugin and all the foreign keys are manually encoded and decoded in parse and format methods.
encoding and decoding id (primary key) in parse and format will cause of unpopulated related records. and the reason why i cannot add the foreign keys in hidden is that it will not being populated when fetching withRelated.
All in all. thank you very much. closing this issue now.
Best Regards, Jason Villalon
Another alternative is using the Visibility plugin:
That way you create relationships using
id
but the users only seeenconded_id
.