c88cb5ac0e
- FileController encrypts uploads using AES-GCM with salt and IV. - Downloads are decrypted on-the-fly using user-supplied password. - File metadata (salt, IV, username, path) stored in DB.
23 lines
364 B
Java
23 lines
364 B
Java
package com.skycrate.backend.skycrateBackend.entity;
|
|
|
|
import jakarta.persistence.*;
|
|
|
|
@Entity
|
|
public class FileMetadata {
|
|
|
|
@Id
|
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
|
private Long id;
|
|
|
|
private String filePath;
|
|
|
|
private String username;
|
|
|
|
@Lob
|
|
private byte[] salt;
|
|
|
|
@Lob
|
|
private byte[] iv;
|
|
|
|
// Getters and Setters
|
|
} |