mapoltxx.blogg.se

Safebox review
Safebox review










  1. #Safebox review 64 bits#
  2. #Safebox review portable#
  3. #Safebox review software#
  4. #Safebox review license#

Throw new Exception("Could not find destination folder for block path " + path) Throw new IllegalStateException("Block path " + path + " already exist") įinal long dataLength = () įinal long dataOffset = () įinal String tokens = path.split(Folder.REGEX_DELIMITER) įinal dstFile ĭstFile = (tokens, 1, tokens.length - 1) If (ntainsKey(path.toUpperCase(Environment.getLocale()))) Throw new IllegalStateException("Path of block starting at " + offset + " is not set") If (length properties = new HashMap(omJson(json, MAP_STRING_STRING_TYPE)) įinal String path = properties.get(Block.PATH_LABEL) This.root = new Folder(null, Folder.ROOT_NAME) įinal byte buffer = new byte įinal byte outBuffer = new byte įinal ByteArrayOutputStream baos = new ByteArrayOutputStream(buffer.length) įinal long headerLength = () This.roBlocks = Collections.unmodifiableMap(blocks) This.privateProperties = Collections.unmodifiableMap(props) This.publicHeader = Collections.unmodifiableMap(publicProps) įinal HashMap props = new LinkedHashMap() This.temp = new RandomAccessFile(this.tempFile, "rw") įinal HashMap publicProps = new LinkedHashMap() This.tempFile = Files.createTempFile(null, null).toFile() This.original = new RandomAccessFile(file, "rw") (Cipher.DECRYPT_MODE, this.keySpec, this.algoSpec) This.originalFile = file.getAbsoluteFile() Public Safe(final File file, final Cipher cipher, final SecretKeySpec keySpec, final AlgorithmParameterSpec algoSpec, final int bufferSize) throws Exception * size of the byte buffer to be used in IO operation Private final AlgorithmParameterSpec algoSpec They work by pair: `datagram i ` contains the metadata of the file as an encrypted JSON text and `datagram i+1` contains the bytes of the encrypted file." The following datagrams (from 2 to N) are the encrypted files. It contains encrypted text entries specified by the user. The second datagram `datagram 1` is the *properties*. The *header*'s data is stored in JSON format and can be seen by opening the safe file with a basic text editor. The *header* contains text entries specified by the user and various additional entries incuding a protocol explanation, the type of encoding and the IV of the encryption. The first datagram `datagram 0` is the *header* and is **the only datagram not encrypted**.

#Safebox review 64 bits#

Public final static String PROTOCOL_SPEC = "JSafebox is using a very simple protocol so encrypted files can be easily read by another program, as long as you have the encryption password.Each datagram is preceded by its length stored as a 64 bits (8 bytes) integer (`long` in Java): length 0|datagram 0|length 1|datagram 1|length 3|.|datagram N. Public final static String PROTOCOL_SPEC_LABEL = "protocol description" Public final static String KEY_ALGO_LABEL = "algo" Public final static String ENCRYPTION_IV_LABEL = "iv"

safebox review

Public final static String ENCRYPTION_LABEL = "encryption" Public final static Type BYTE_ARRAY_TYPE = new TypeToken()

safebox review

Private final static Type MAP_STRING_STRING_TYPE = new TypeToken>()

safebox review

Public final static Gson GSON = new Gson() Public final static String UTF8 = "UTF-8"

#Safebox review license#

* License for the specific language governing permissions and limitations under the License.

#Safebox review software#

* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * Copyright 2018 Ortis Licensed under the Apache License, Version 2.0 (the "License") you may not use this file except in compliance with the License. The majority of sensitive operations are located in the following classes: The project is highly focused on security and I would appreciate any feedback that would help improve the quality of the code. The goal is to provide a secured environment where the user can browse encrypted files without leaking data on the drive.

#Safebox review portable#

I am developing JSafebox, a portable safebox project written in Java.












Safebox review