public interface LicenseService extends EditableService<License,Long>
Modifier and Type | Method and Description |
---|---|
String |
decrypt(byte[] encryptedText,
PublicKey key)
Metoda deszyfruje przy pomocy klucza publicznego.
|
String |
encrypt(String textToEncrypt)
Metoda szyfruje przy pomocy klucza prywatnego.
|
void |
generateKeys()
Metoda generuje parę kluczy służącą do szyfrowania/odszyfrowania danych.
|
String |
getCipkerSep()
Metoda zwraca separator wykorzystany w pliku licencyjnym
|
KeyPair |
getKeypair()
Metoda zwraca wygenerowaną parę kluczy.
|
License |
getLicense()
Zwraca obiekt najświeższej licencji
|
List<String> |
readLicenseFile(InputStream is)
Metoda rozdziela wczytany plik licencyjny na dane licencyjne i klucz publiczny i zapisuje je w pamięci podręcznej
|
List<String> |
readLicenseFromDB(License license)
Metoda odczytuje dane licencyjne z bazy danych
|
delete, save, update
count, countAll, findByCriteria, findByCriteria, findByProperty, findOne, findOneByProperty, get, get, getAll, getAll
License getLicense()
void generateKeys() throws NoSuchAlgorithmException
NoSuchAlgorithmException
String encrypt(String textToEncrypt) throws Exception
textToEncrypt
- tekst do zaszyfrowaniakey
- - klucz prywatnyException
String decrypt(byte[] encryptedText, PublicKey key) throws Exception
encryptedText
- tekst do zdeszyfrowaniakey
- - klucz publicznyException
List<String> readLicenseFile(InputStream is) throws Exception
is
- - strumień odczytany z pliku licencyjnegoException
List<String> readLicenseFromDB(License license) throws Exception
Exception
KeyPair getKeypair()
String getCipkerSep()
Copyright © 2014 Suncode. All rights reserved.